Qpid Proton C++ API 0.40.0
 
Loading...
Searching...
No Matches
receiver_options

Options for creating a receiver. More...

#include <receiver_options.hpp>

Public Member Functions

 receiver_options ()
 Create an empty set of options.
 
 receiver_options (const receiver_options &)
 Copy options.
 
receiver_optionsoperator= (const receiver_options &)
 Copy options.
 
void update (const receiver_options &other)
 Merge with another option set.
 
receiver_optionshandler (class messaging_handler &)
 Set a messaging_handler for receiver events only.
 
receiver_optionsdelivery_mode (delivery_mode)
 Set the delivery mode on the receiver.
 
receiver_optionsauto_accept (bool)
 Enable or disable automatic acceptance of messages that aren't otherwise released, rejected, or modified.
 
receiver_optionsauto_settle (bool)
 Deprecated - Applicable only to sender, not receiver.
 
receiver_optionssource (source_options &)
 Options for the source node of the receiver.
 
receiver_optionstarget (target_options &)
 Options for the target node of the receiver.
 
receiver_optionscredit_window (int count)
 Automatically replenish credit for flow control up to count messages.
 
receiver_optionsname (const std::string &name)
 Set the link name. If not set a unique name is generated.
 
receiver_optionsproperties (const std::map< symbol, value > &)
 Unsettled API - Link properties.
 

Detailed Description

Options for creating a receiver.

Options can be "chained" like this:

l = container.create_receiver(url, receiver_options().handler(h).auto_accept(true));
A top-level container of connections, sessions, and links.
Definition container.hpp:50
receiver_options & handler(class messaging_handler &)
Set a messaging_handler for receiver events only.
receiver_options & auto_accept(bool)
Enable or disable automatic acceptance of messages that aren't otherwise released,...
receiver_options()
Create an empty set of options.
Deprecated - Use a third-party URL library.
Definition url.hpp:66

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.auto_accept(true);
c2 = container.open_receiver(url2, opts.handler(h2));
returned< receiver > open_receiver(const std::string &addr_url)
Open a connection and receiver for addr_url.
Options for creating a receiver.
Definition receiver_options.hpp:59

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

Examples
broker.cpp, client.cpp, multithreaded_client_flow_control.cpp, service_bus.cpp, and tracing_client.cpp.

Member Function Documentation

◆ handler()

receiver_options & handler ( class messaging_handler )

Set a messaging_handler for receiver events only.

The handler is no longer in use when messaging_handler::on_receiver_close() is called.

Examples
broker.cpp.

◆ delivery_mode()

Set the delivery mode on the receiver.

The default is delivery_mode::AT_LEAST_ONCE.

◆ auto_accept()

receiver_options & auto_accept ( bool  )

Enable or disable automatic acceptance of messages that aren't otherwise released, rejected, or modified.

It is enabled by default.

◆ credit_window()

receiver_options & credit_window ( int  count)

Automatically replenish credit for flow control up to count messages.

The default is 10. Set to zero to disable automatic replenishment.


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