public class ProtonStreams extends Object
Constructor and Description |
---|
ProtonStreams() |
Modifier and Type | Method and Description |
---|---|
static ProtonPublisher<org.apache.qpid.proton.message.Message> |
createConsumer(ProtonConnection connection,
String address)
Creates an AMQP consumer, presented as a reactive streams
Publisher . |
static ProtonPublisher<org.apache.qpid.proton.message.Message> |
createConsumer(ProtonConnection connection,
String address,
ProtonPublisherOptions options)
Creates an AMQP consumer, presented as a reactive streams
Publisher . |
static ProtonPublisher<Delivery> |
createDeliveryConsumer(ProtonConnection connection,
String address)
Creates an AMQP consumer, presented as a reactive streams
Publisher . |
static ProtonPublisher<Delivery> |
createDeliveryConsumer(ProtonConnection connection,
String address,
ProtonPublisherOptions options)
Creates an AMQP consumer, presented as a reactive streams
Publisher . |
static ProtonSubscriber<org.apache.qpid.proton.message.Message> |
createProducer(ProtonConnection connection,
String address)
Creates an AMQP producer, presented as a reactive streams
Subscriber . |
static ProtonSubscriber<org.apache.qpid.proton.message.Message> |
createProducer(ProtonConnection connection,
String address,
ProtonSubscriberOptions options)
Creates an AMQP producer, presented as a reactive streams
Subscriber . |
static ProtonSubscriber<Tracker> |
createTrackerProducer(ProtonConnection connection,
String address)
Creates an AMQP producer, presented as a reactive streams
Subscriber . |
static ProtonSubscriber<Tracker> |
createTrackerProducer(ProtonConnection connection,
String address,
ProtonSubscriberOptions options)
Creates an AMQP producer, presented as a reactive streams
Subscriber . |
public static ProtonPublisher<Delivery> createDeliveryConsumer(ProtonConnection connection, String address)
Publisher
.
Messages are carried by Delivery
elements of the stream, which are used by the consuming application
to explicitly acknowledge each message after processing it.
The publisher may only be subscribed to a single time.
Must be called on the Context
thread for the given connection.connection
- the connection to create the consumer with.address
- The source address to attach the consumer to.public static ProtonPublisher<Delivery> createDeliveryConsumer(ProtonConnection connection, String address, ProtonPublisherOptions options)
Publisher
.
Messages are carried by Delivery
elements of the stream, which are used by the consuming
application to explicitly acknowledge each message after processing it.
The publisher may only be subscribed to a single time.
Must be called on the Context
thread for the given connection.
The consumer link is closed when the subscription is cancelled, unless the passed options request a
durable sub, in which case the link is only detached. A Dynamic address can be requested by setting
the dynamic option true.connection
- the connection to create the consumer with.address
- The source address to attach the consumer to, or null the 'dynamic' option is being used.options
- The options.public static ProtonPublisher<org.apache.qpid.proton.message.Message> createConsumer(ProtonConnection connection, String address)
Publisher
.
Messages will be automatically accepted when the Subscriber#onNext(Object)
method returns. If you require more control over when the message is accepted, you should use
createDeliveryConsumer(ProtonConnection, String)
instead.
The publisher may only be subscribed to a single time.
Must be called on the Context
thread for the given connection.connection
- the connection to create the consumer with.address
- The source address to attach the consumer to.public static ProtonPublisher<org.apache.qpid.proton.message.Message> createConsumer(ProtonConnection connection, String address, ProtonPublisherOptions options)
Publisher
.
Messages will be automatically accepted when the Subscriber#onNext(Object)
method returns. If you require more control over when the message is accepted, you should use
createDeliveryConsumer(ProtonConnection, String, ProtonPublisherOptions)
instead.
The publisher may only be subscribed to a single time.
Must be called on the Context
thread for the given connection.connection
- the connection to create the consumer with.address
- The source address to attach the consumer to.options
- The options.public static ProtonSubscriber<Tracker> createTrackerProducer(ProtonConnection connection, String address)
Subscriber
.
The status of the message delivery, i.e whether the server peer accepts it etc, can be checked
using its containing tracker, which are created using Tracker.create(Message, io.vertx.core.Handler)
or Tracker.create(Message)
.
The subscriber may only be subscribed once.
Must be called on the Context
thread for the given connection.
If no address (i.e null) is specified then a producer will be established to the 'anonymous relay'
and each message sent must specify its individual destination address.connection
- the connection to create the consumer with.address
- The target address to attach the producer to (or null to send to the anonymous relay).public static ProtonSubscriber<Tracker> createTrackerProducer(ProtonConnection connection, String address, ProtonSubscriberOptions options)
Subscriber
.
The status of the message delivery, i.e whether the server peer accepts it etc, can be checked
using its containing tracker, which are created using Tracker.create(Message, io.vertx.core.Handler)
or Tracker.create(Message)
.
The subscriber may only be subscribed once.
Must be called on the Context
thread for the given connection.
If no address (i.e null) is specified then a producer will be established to the 'anonymous relay'
and each message sent must specify its individual destination address.connection
- the connection to create the consumer with.address
- The target address to attach the producer to (or null to send to the anonymous relay).options
- The options.public static ProtonSubscriber<org.apache.qpid.proton.message.Message> createProducer(ProtonConnection connection, String address)
Subscriber
.
The status of the message delivery can not be tracked after send, if you need that ability use
createTrackerProducer(ProtonConnection, String)
.
The subscriber may only be subscribed once.
Must be called on the Context
thread for the given connection.
If no address (i.e null) is specified then a producer will be established to the 'anonymous relay'
and each message sent must specify its individual destination address.connection
- the connection to create the consumer with.address
- The target address to attach the producer to (or null to send to the anonymous relay).public static ProtonSubscriber<org.apache.qpid.proton.message.Message> createProducer(ProtonConnection connection, String address, ProtonSubscriberOptions options)
Subscriber
.
The status of the message delivery can not be tracked after send, if you need that ability use
createTrackerProducer(ProtonConnection, String, ProtonSubscriberOptions)
.
The subscriber may only be subscribed once.
Must be called on the Context
thread for the given connection.
If no address (i.e null) is specified then a producer will be established to the 'anonymous relay'
and each message sent must specify its individual destination address.connection
- the connection to create the consumer with.address
- The target address to attach the producer to (or null to send to the anonymous relay).options
- The options.Copyright © 2021 Eclipse. All rights reserved.