Class ZeroMqMessageHandlerSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,ReactiveMessageHandlerAdapter>
org.springframework.integration.dsl.ReactiveMessageHandlerSpec<ZeroMqMessageHandlerSpec,ZeroMqMessageHandler>
org.springframework.integration.zeromq.dsl.ZeroMqMessageHandlerSpec
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<ReactiveMessageHandlerAdapter>,InitializingBean,Lifecycle,Phased,SmartLifecycle,ComponentsRegistration
public class ZeroMqMessageHandlerSpec extends ReactiveMessageHandlerSpec<ZeroMqMessageHandlerSpec,ZeroMqMessageHandler>
The
ReactiveMessageHandlerSpec extension for ZeroMqMessageHandler.- Since:
- 5.4
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.ReactiveMessageHandlerSpec
reactiveMessageHandlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target -
Constructor Summary
Constructors Modifier Constructor Description protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, String connectUrl)Create an instance based on the providedZContextand connection string.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, String connectUrl, org.zeromq.SocketType socketType)Create an instance based on the providedZContext, connection string andSocketType. -
Method Summary
Modifier and Type Method Description ZeroMqMessageHandlerSpecmessageConverter(MessageConverter messageConverter)Provide aMessageConverter(as an alternative tomessageMapper(org.springframework.integration.mapping.OutboundMessageMapper<byte[]>)) for converting a request message intobyte[]for sending into ZeroMq socket.ZeroMqMessageHandlerSpecmessageMapper(OutboundMessageMapper<byte[]> messageMapper)Provide anOutboundMessageMapperto convert a request message intobyte[]for sending into ZeroMq socket.ZeroMqMessageHandlerSpecsocketConfigurer(Consumer<org.zeromq.ZMQ.Socket> socketConfigurer)Provide aConsumerto configure a socket with arbitrary options, like security.ZeroMqMessageHandlerSpectopic(String topic)Specify a topic theSocketType.PUBsocket is going to use for distributing messages into the subscriptions.ZeroMqMessageHandlerSpectopicExpression(String topicExpression)Specify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.ZeroMqMessageHandlerSpectopicExpression(Expression topicExpression)Specify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.ZeroMqMessageHandlerSpectopicFunction(Function<Message<?>,String> topicFunction)Specify aFunctionto evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.Methods inherited from class org.springframework.integration.dsl.ReactiveMessageHandlerSpec
getComponentsToRegisterMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
ZeroMqMessageHandlerSpec
Create an instance based on the providedZContextand connection string.- Parameters:
context- theZContextto use for creating sockets.connectUrl- the URL to connect the socket to.
-
ZeroMqMessageHandlerSpec
protected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context, String connectUrl, org.zeromq.SocketType socketType)Create an instance based on the providedZContext, connection string andSocketType.- Parameters:
context- theZContextto use for creating sockets.connectUrl- the URL to connect the socket to.socketType- theSocketTypeto use; onlySocketType.PAIR,SocketType.PUBandSocketType.PUSHare supported.
-
-
Method Details
-
messageMapper
Provide anOutboundMessageMapperto convert a request message intobyte[]for sending into ZeroMq socket.- Parameters:
messageMapper- theOutboundMessageMapperto use.- Returns:
- the spec
-
messageConverter
Provide aMessageConverter(as an alternative tomessageMapper(org.springframework.integration.mapping.OutboundMessageMapper<byte[]>)) for converting a request message intobyte[]for sending into ZeroMq socket.- Parameters:
messageConverter- theMessageConverterto use.- Returns:
- the spec
-
socketConfigurer
Provide aConsumerto configure a socket with arbitrary options, like security.- Parameters:
socketConfigurer- the configurer for socket options.- Returns:
- the spec
-
topic
Specify a topic theSocketType.PUBsocket is going to use for distributing messages into the subscriptions. It is ignored for all otherSocketTypes supported.- Parameters:
topic- the topic to use.- Returns:
- the spec
-
topicFunction
Specify aFunctionto evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.- Parameters:
topicFunction- theFunctionto evaluate topic for publishing.- Returns:
- the spec
-
topicExpression
Specify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.- Parameters:
topicExpression- the expression to evaluate topic for publishing.- Returns:
- the spec
-
topicExpression
Specify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.- Parameters:
topicExpression- the expression to evaluate topic for publishing.- Returns:
- the spec
-