The AMQP specification provides for a series of "basic properties" that can be attached to messages. These functions allow for creating a set of these properties and decoding them into an R list.
amqp_properties(...) # S3 method for amqp_properties as.list(x, ...) # S3 method for amqp_properties print(x, ...)
... | Basic properties or headers. See Details. For
|
---|---|
x | An object of class |
Arguments from the following list will be converted into the corresponding AMQP Basic Property. Additional arguments are converted to headers. Note that all values must be of length 1, and properties themselves are generally strings or integers.
content_type
MIME content type.
content_encoding
MIME content encoding.
delivery_mode
Non-persistent (1) or persistent (2).
priority
Message priority, 0 to 9.
correlation_id
Application correlation identifier.
reply_to
Address to reply to.
expiration
Message expiration specification.
message_id
Application message identifier.
timestamp
Message timestamp.
type
Message type name.
user_id
Client user identifier.
app_id
Client application identifier.
cluster_id
Cluster identifier.
(props <- amqp_properties( content_type = "text/plain", content_encoding = "UTF-8", delivery_mode = 2, priority = 2, correlation_id = "2", reply_to = "1", expiration = "18000", message_id = "2", type = "message", user_id = "guest", app_id = "my_app", cluster_id = "cluster" )) #> AMQP Message Properties as.list(props) #> $content_type #> [1] "text/plain" #> #> $content_encoding #> [1] "UTF-8" #> #> $delivery_mode #> [1] 2 #> #> $priority #> [1] 2 #> #> $correlation_id #> [1] "2" #> #> $reply_to #> [1] "1" #> #> $expiration #> [1] "18000" #> #> $message_id #> [1] "2" #> #> $type #> [1] "message" #> #> $user_id #> [1] "guest" #> #> $app_id #> [1] "my_app" #> #> $cluster_id #> [1] "cluster" #>