public class ZeroMqChannelSpec extends MessageChannelSpec<ZeroMqChannelSpec,ZeroMqChannel>
MessageChannelSpec for a ZeroMqChannel.channelPARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
ZeroMqChannelSpec(org.zeromq.ZContext context,
boolean pubSub) |
| Modifier and Type | Method and Description |
|---|---|
ZeroMqChannelSpec |
connectUrl(String connectUrl)
Configure a connection to the ZeroMQ proxy with the pair of ports over colon
for proxy frontend and backend sockets.
|
ZeroMqChannelSpec |
consumeDelay(java.time.Duration consumeDelay)
Specify a
Duration to delay consumption when no data received. |
ZeroMqChannelSpec |
messageMapper(BytesMessageMapper messageMapper)
Provide a
BytesMessageMapper to convert to/from messages when send or receive happens
on the sockets. |
ZeroMqChannelSpec |
sendSocketConfigurer(java.util.function.Consumer<org.zeromq.ZMQ.Socket> sendSocketConfigurer)
The
Consumer callback to configure a publishing socket. |
ZeroMqChannelSpec |
subscribeSocketConfigurer(java.util.function.Consumer<org.zeromq.ZMQ.Socket> subscribeSocketConfigurer)
The
Consumer callback to configure a consuming socket. |
ZeroMqChannelSpec |
zeroMqProxy(ZeroMqProxy zeroMqProxy)
Specify a reference to a
ZeroMqProxy instance in the same application
to rely on its ports configuration and make a natural lifecycle dependency without guessing
when the proxy is started. |
datatype, doGet, getComponentsToRegister, interceptor, messageConverter, wireTap, wireTap, wireTap_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonprotected ZeroMqChannelSpec(org.zeromq.ZContext context,
boolean pubSub)
public ZeroMqChannelSpec connectUrl(String connectUrl)
zeroMqProxy(ZeroMqProxy).connectUrl - the connection string in format PROTOCOL://HOST:FRONTEND_PORT:BACKEND_PORT,
e.g. tcp://localhost:6001:6002public ZeroMqChannelSpec zeroMqProxy(ZeroMqProxy zeroMqProxy)
ZeroMqProxy instance in the same application
to rely on its ports configuration and make a natural lifecycle dependency without guessing
when the proxy is started. Mutually exclusive with the connectUrl(String).zeroMqProxy - the ZeroMqProxy instance to usepublic ZeroMqChannelSpec consumeDelay(java.time.Duration consumeDelay)
Duration to delay consumption when no data received.consumeDelay - the Duration to delay consumption when empty;
defaults to ZeroMqChannel.DEFAULT_CONSUME_DELAY.public ZeroMqChannelSpec messageMapper(BytesMessageMapper messageMapper)
BytesMessageMapper to convert to/from messages when send or receive happens
on the sockets.messageMapper - the BytesMessageMapper to use.public ZeroMqChannelSpec sendSocketConfigurer(java.util.function.Consumer<org.zeromq.ZMQ.Socket> sendSocketConfigurer)
Consumer callback to configure a publishing socket.sendSocketConfigurer - the Consumer to use.public ZeroMqChannelSpec subscribeSocketConfigurer(java.util.function.Consumer<org.zeromq.ZMQ.Socket> subscribeSocketConfigurer)
Consumer callback to configure a consuming socket.subscribeSocketConfigurer - the Consumer to use.