Class RedisTransport
java.lang.Object
com.iantapply.orchestra.adapter.redis.RedisTransport
- All Implemented Interfaces:
NetworkTransport, AutoCloseable
Redis Pub/Sub transport with daemon subscription threads and reconnect handling.
-
Nested Class Summary
Nested classes/interfaces inherited from interface NetworkTransport
NetworkTransport.Subscription -
Constructor Summary
ConstructorsConstructorDescriptionRedisTransport(URI uri, String namespace) Creates a Redis Pub/Sub transport. -
Method Summary
-
Constructor Details
-
RedisTransport
-
-
Method Details
-
publish
Description copied from interface:NetworkTransportPublishes one binary message.- Specified by:
publishin interfaceNetworkTransport- Parameters:
channel- logical channel namepayload- immutable message bytes for the duration of the call
-
subscribe
Description copied from interface:NetworkTransportSubscribes to a logical channel.- Specified by:
subscribein interfaceNetworkTransport- Parameters:
channel- logical channel namelistener- message callback- Returns:
- subscription handle
-
close
public void close()Description copied from interface:NetworkTransportCloses all subscriptions and rejects new work.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceNetworkTransport
-