public interface MessageProducer<T>
Modifier and Type | Method and Description |
---|---|
String |
address() |
Future<Void> |
close()
Closes the producer, this method should be called when the message producer is not used anymore.
|
void |
close(Handler<AsyncResult<Void>> handler)
Same as
close() but with an handler called when the operation completes |
MessageProducer<T> |
deliveryOptions(DeliveryOptions options)
Update the delivery options of this producer.
|
Future<Void> |
write(T body)
Like
write(Object, Handler) but returns a Future of the asynchronous result |
void |
write(T body,
Handler<AsyncResult<Void>> handler)
Write a message to the event-bus, either sending or publishing.
|
MessageProducer<T> deliveryOptions(DeliveryOptions options)
options
- the new optionsString address()
void write(T body, Handler<AsyncResult<Void>> handler)
handler
completion depends on the producer type:
handler
is not a delivery guarantee.body
- the message bodyFuture<Void> write(T body)
write(Object, Handler)
but returns a Future
of the asynchronous resultFuture<Void> close()
void close(Handler<AsyncResult<Void>> handler)
close()
but with an handler
called when the operation completesCopyright © 2024 Eclipse. All rights reserved.