Function amqp_login_with_properties

Summary

#include <librabbitmq/amqp.h>

(1) amqp_rpc_reply_t amqp_login_with_properties(amqp_connection_state_t state, char const *vhost, int channel_max, int frame_max, int heartbeat, const amqp_table_t *properties, amqp_sasl_method_enum sasl_method,...)

#include <librabbitmq/amqp_socket.c>

(2) amqp_rpc_reply_t amqp_login_with_properties(amqp_connection_state_t state, char const *vhost, int channel_max, int frame_max, int heartbeat, const amqp_table_t *client_properties, int sasl_method,...)

Function overload

Synopsis

#include <librabbitmq/amqp.h>

amqp_rpc_reply_t amqp_login_with_properties(amqp_connection_state_t state, char const *vhost, int channel_max, int frame_max, int heartbeat, const amqp_table_t *properties, amqp_sasl_method_enum sasl_method,...)

Description

Login to the broker passing a properties table

This function is similar to amqp_login() and differs in that it provides a way to pass client properties to the broker. This is commonly used to negotiate newer protocol features as they are supported by the broker.

Parameters:

[ in ] state - the connection object

[ in ] vhost - the virtual host to connect to on the broker. The default on most brokers is "/"

[ in ] channel_max - the limit for the number of channels for the connection. 0 means no limit, and is a good default (AMQP_DEFAULT_MAX_CHANNELS) Note that the maximum number of channels the protocol supports is 65535 (2^16, with the 0-channel reserved). The server can set a lower channel_max and then the client will use the lowest of the two

[ in ] frame_max - the maximum size of an AMQP frame ont he wire to request of the broker for this connection. 4096 is the minimum size, 2^31-1 is the maximum, a good default is 131072 (128KB), or AMQP_DEFAULT_FRAME_SIZE

[ in ] heartbeat - the number of seconds between heartbeat frame to request of the broker. A value of 0 disables heartbeats. Note rabbitmq-c only has partial support for hearts, as of v0.4.0 heartbeats are only serviced during amqp_basic_publish(), and amqp_simple_wait_frame()/amqp_simple_wait_frame_noblock()

[ in ] properties - a table of properties to send the broker.

[ in ] sasl_method - the SASL method to authenticate with the broker followed by the authentication information. The following SASL methods are implemented:

Return
amqp_rpc_reply_t indicating success or failure.
Since
v0.4.0

Source

Line 1857 in librabbitmq/amqp.h.

Synopsis

#include <librabbitmq/amqp_socket.c>

amqp_rpc_reply_t amqp_login_with_properties(amqp_connection_state_t state, char const *vhost, int channel_max, int frame_max, int heartbeat, const amqp_table_t *client_properties, int sasl_method,...)

Description

No description yet.

Source

Lines 1482-1498 in librabbitmq/amqp_socket.c.

amqp_rpc_reply_t amqp_login_with_properties(
    amqp_connection_state_t state, char const *vhost, int channel_max,
    int frame_max, int heartbeat, const amqp_table_t *client_properties,
    int sasl_method, ...) {
  va_list vl;
  amqp_rpc_reply_t ret;

  va_start(vl, sasl_method);

  ret = amqp_login_inner(state, vhost, channel_max, frame_max, heartbeat,
                         client_properties, state->handshake_timeout,
                         sasl_method, vl);

  va_end(vl);

  return ret;
}





Add Discussion as Guest

Log in to DocsForge