public class ZeroMqMessageHandlerSpec extends ReactiveMessageHandlerSpec<ZeroMqMessageHandlerSpec,ZeroMqMessageHandler>
ReactiveMessageHandlerSpec extension for ZeroMqMessageHandler.reactiveMessageHandlerPARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
ZeroMqMessageHandlerSpec(org.zeromq.ZContext context,
String connectUrl)
Create an instance based on the provided
ZContext and connection string. |
protected |
ZeroMqMessageHandlerSpec(org.zeromq.ZContext context,
String connectUrl,
org.zeromq.SocketType socketType)
Create an instance based on the provided
ZContext, connection string and SocketType. |
| Modifier and Type | Method and Description |
|---|---|
ZeroMqMessageHandlerSpec |
messageConverter(MessageConverter messageConverter)
Provide a
MessageConverter (as an alternative to messageMapper(org.springframework.integration.mapping.OutboundMessageMapper<byte[]>))
for converting a request message into byte[] for sending into ZeroMq socket. |
ZeroMqMessageHandlerSpec |
messageMapper(OutboundMessageMapper<byte[]> messageMapper)
Provide an
OutboundMessageMapper to convert a request message into byte[]
for sending into ZeroMq socket. |
ZeroMqMessageHandlerSpec |
socketConfigurer(java.util.function.Consumer<org.zeromq.ZMQ.Socket> socketConfigurer)
Provide a
Consumer to configure a socket with arbitrary options, like security. |
ZeroMqMessageHandlerSpec |
topic(String topic)
Specify a topic the
SocketType.PUB socket is going to use for distributing messages into the
subscriptions. |
ZeroMqMessageHandlerSpec |
topicExpression(Expression topicExpression)
Specify a SpEL expression to evaluate a topic a
SocketType.PUB
is going to use for distributing messages into the
subscriptions.It is ignored for all other SocketTypes supported. |
ZeroMqMessageHandlerSpec |
topicExpression(String topicExpression)
Specify a SpEL expression to evaluate a topic a
SocketType.PUB
is going to use for distributing messages into the
subscriptions.It is ignored for all other SocketTypes supported. |
ZeroMqMessageHandlerSpec |
topicFunction(java.util.function.Function<Message<?>,String> topicFunction)
Specify a
Function to evaluate a topic a SocketType.PUB
is going to use for distributing messages into the
subscriptions.It is ignored for all other SocketTypes supported. |
getComponentsToRegister_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonprotected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context,
String connectUrl)
ZContext and connection string.context - the ZContext to use for creating sockets.connectUrl - the URL to connect the socket to.protected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context,
String connectUrl,
org.zeromq.SocketType socketType)
ZContext, connection string and SocketType.context - the ZContext to use for creating sockets.connectUrl - the URL to connect the socket to.socketType - the SocketType to use;
only SocketType.PAIR, SocketType.PUB and SocketType.PUSH are supported.public ZeroMqMessageHandlerSpec messageMapper(OutboundMessageMapper<byte[]> messageMapper)
OutboundMessageMapper to convert a request message into byte[]
for sending into ZeroMq socket.messageMapper - the OutboundMessageMapper to use.public ZeroMqMessageHandlerSpec messageConverter(MessageConverter messageConverter)
MessageConverter (as an alternative to messageMapper(org.springframework.integration.mapping.OutboundMessageMapper<byte[]>))
for converting a request message into byte[] for sending into ZeroMq socket.messageConverter - the MessageConverter to use.public ZeroMqMessageHandlerSpec socketConfigurer(java.util.function.Consumer<org.zeromq.ZMQ.Socket> socketConfigurer)
Consumer to configure a socket with arbitrary options, like security.socketConfigurer - the configurer for socket options.public ZeroMqMessageHandlerSpec topic(String topic)
SocketType.PUB socket is going to use for distributing messages into the
subscriptions. It is ignored for all other SocketTypes supported.topic - the topic to use.public ZeroMqMessageHandlerSpec topicFunction(java.util.function.Function<Message<?>,String> topicFunction)
Function to evaluate a topic a SocketType.PUB
is going to use for distributing messages into the
subscriptions.It is ignored for all other SocketTypes supported.topicFunction - the Function to evaluate topic for publishing.public ZeroMqMessageHandlerSpec topicExpression(String topicExpression)
SocketType.PUB
is going to use for distributing messages into the
subscriptions.It is ignored for all other SocketTypes supported.topicExpression - the expression to evaluate topic for publishing.public ZeroMqMessageHandlerSpec topicExpression(Expression topicExpression)
SocketType.PUB
is going to use for distributing messages into the
subscriptions.It is ignored for all other SocketTypes supported.topicExpression - the expression to evaluate topic for publishing.