Class ZeroMqMessageProducerSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,P>
org.springframework.integration.dsl.MessageProducerSpec<ZeroMqMessageProducerSpec,ZeroMqMessageProducer>
org.springframework.integration.zeromq.dsl.ZeroMqMessageProducerSpec
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<ZeroMqMessageProducer>,InitializingBean,Lifecycle,Phased,SmartLifecycle
public class ZeroMqMessageProducerSpec
extends MessageProducerSpec<ZeroMqMessageProducerSpec,ZeroMqMessageProducer>
- Since:
- 5.4
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, targetFields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedZeroMqMessageProducerSpec(org.zeromq.ZContext context) protectedZeroMqMessageProducerSpec(org.zeromq.ZContext context, org.zeromq.SocketType socketType) -
Method Summary
Modifier and TypeMethodDescriptionbindPort(int port) Configure a port for TCP protocol binding viaZMQ.Socket.bind(String).connectUrl(String connectUrl) Configure an URL forZMQ.Socket.connect(String).consumeDelay(Duration consumeDelay) Specify aDurationto delay consumption when no data received.messageConverter(MessageConverter messageConverter) Provide aMessageConverter(as an alternative tomessageMapper(org.springframework.integration.mapping.InboundMessageMapper<byte[]>)) for converting a consumed data into a message to produce.messageMapper(InboundMessageMapper<byte[]> messageMapper) Provide anInboundMessageMapperto convert a consumed data into a message to produce.receiveRaw(boolean receiveRaw) Whether rawZMsgis present as a payload of message to produce or it is fully converted to aMessageincludingZeroMqHeaders.TOPICheader (if any).socketConfigurer(Consumer<org.zeromq.ZMQ.Socket> socketConfigurer) Provide aConsumerto configure a socket with arbitrary options, like security.Specify topics theSocketType.SUBsocket is going to use for subscription.Methods inherited from class org.springframework.integration.dsl.MessageProducerSpec
autoStartup, errorChannel, errorChannel, errorMessageStrategy, id, observationConvention, outputChannel, outputChannel, phase, sendTimeout, shouldTrackMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, 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
-
ZeroMqMessageProducerSpec
protected ZeroMqMessageProducerSpec(org.zeromq.ZContext context) -
ZeroMqMessageProducerSpec
protected ZeroMqMessageProducerSpec(org.zeromq.ZContext context, org.zeromq.SocketType socketType)
-
-
Method Details
-
consumeDelay
Specify aDurationto delay consumption when no data received.- Parameters:
consumeDelay- theDurationto delay consumption when empty.- Returns:
- the spec
-
messageMapper
Provide anInboundMessageMapperto convert a consumed data into a message to produce.- Parameters:
messageMapper- theInboundMessageMapperto use.- Returns:
- the spec
-
messageConverter
Provide aMessageConverter(as an alternative tomessageMapper(org.springframework.integration.mapping.InboundMessageMapper<byte[]>)) for converting a consumed data into a message to produce.- Parameters:
messageConverter- theMessageConverterto use.- Returns:
- the spec
-
receiveRaw
Whether rawZMsgis present as a payload of message to produce or it is fully converted to aMessageincludingZeroMqHeaders.TOPICheader (if any).- Parameters:
receiveRaw- to convert fromZMsgor not; defaults to convert.- Returns:
- the spec
-
socketConfigurer
Provide aConsumerto configure a socket with arbitrary options, like security.- Parameters:
socketConfigurer- the configurer for socket options.- Returns:
- the spec
-
topics
Specify topics theSocketType.SUBsocket is going to use for subscription. It is ignored for all otherSocketTypes supported.- Parameters:
topics- the topics to use.- Returns:
- the spec
-
connectUrl
Configure an URL forZMQ.Socket.connect(String).- Parameters:
connectUrl- the URL to connect ZeroMq socket to.- Returns:
- the spec
-
bindPort
Configure a port for TCP protocol binding viaZMQ.Socket.bind(String).- Parameters:
port- the port to bind ZeroMq socket to over TCP.- Returns:
- the spec
-