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_options & | operator= (const sender_options &)
| Copy options.
void | update (const sender_options &other)
| Merge with another option set.
sender_options & | handler (class messaging_handler &)
| Set a messaging_handler for sender events only. More...
sender_options & | delivery_mode (delivery_mode)
| Set the delivery mode on the sender.
sender_options & | auto_settle (bool)
| Automatically settle messages (default is true).
sender_options & | source (const source_options &)
| Options for the source node of the sender.
sender_options & | target (const target_options &)
| Options for the receiver node of the receiver.
sender_options & | name (const std::string &name)
| Set the link name. If not set a unique name is generated.

## 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));
proton::sender_options::auto_settle
sender_options & auto_settle(bool)
Automatically settle messages (default is true).
proton::sender_options::handler
sender_options & handler(class messaging_handler &)
Set a messaging_handler for sender events only.
proton::sender_options::sender_options
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:

sender_options opts;
opts.delivery_mode(delivery_mode::AT_MOST_ONCE);
l1 = container.open_sender(url1, opts.handler(h1));
c2 = container.open_receiver(url2, opts.handler(h2));
proton::delivery_mode::AT_MOST_ONCE
@ 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()

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

- proton/sender_options.hpp