Qpid Proton C++ API  0.38.0
sender_options

Options for creating a sender. More...

#include <sender_options.hpp>

Public Member Functions

 sender_options ()
 Create an empty set of options.
 
 sender_options (const sender_options &)
 Copy options.
 
sender_optionsoperator= (const sender_options &)
 Copy options.
 
void update (const sender_options &other)
 Merge with another option set.
 
sender_optionshandler (class messaging_handler &)
 Set a messaging_handler for sender events only. More...
 
sender_optionsdelivery_mode (delivery_mode)
 Set the delivery mode on the sender.
 
sender_optionsauto_settle (bool)
 If True (default), automatically settle messages upon receiving a settled disposition for that delivery. More...
 
sender_optionssource (const source_options &)
 Options for the source node of the sender.
 
sender_optionstarget (const target_options &)
 Options for the receiver node of the receiver.
 
sender_optionsname (const std::string &name)
 Set the link name. If not set a unique name is generated.
 
sender_optionsproperties (const std::map< symbol, value > &)
 Unsettled API - Link properties.
 

Detailed Description

Options for creating a sender.

Options can be "chained" like this:

l = container.create_sender(url, sender_options().handler(h).auto_settle(false));
sender_options & auto_settle(bool)
If True (default), automatically settle messages upon receiving a settled disposition for that delive...
sender_options & handler(class messaging_handler &)
Set a messaging_handler for sender events only.
sender_options()
Create an empty set of options.

You can also create an options object with common settings and use it as a base for different connections that have mostly the same settings:

opts.delivery_mode(delivery_mode::AT_MOST_ONCE);
l1 = container.open_sender(url1, opts.handler(h1));
c2 = container.open_receiver(url2, opts.handler(h2));
@ AT_MOST_ONCE
Outgoing messages are settled immediately by the link.
Definition: delivery_mode.hpp:41

Normal value semantics: copy or assign creates a separate copy of the options.

Examples
broker.cpp, server_direct.cpp, and service_bus.cpp.

Member Function Documentation

◆ handler()

sender_options& handler ( class messaging_handler )

Set a messaging_handler for sender events only.

The handler is no longer in use when messaging_handler::on_sender_close() is called. messaging_handler::on_sender_close() may not be called if a connection is aborted, in that case it should be cleaned up in its connection's messaging_handler::on_transport_close()

◆ auto_settle()

sender_options& auto_settle ( bool  )

If True (default), automatically settle messages upon receiving a settled disposition for that delivery.

Otherwise messages must be explicitly settled.


The documentation for this class was generated from the following file: