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_typeMIME content type.
content_encodingMIME content encoding.
delivery_modeNon-persistent (1) or persistent (2).
priorityMessage priority, 0 to 9.
correlation_idApplication correlation identifier.
reply_toAddress to reply to.
expirationMessage expiration specification.
message_idApplication message identifier.
timestampMessage timestamp.
typeMessage type name.
user_idClient user identifier.
app_idClient application identifier.
cluster_idCluster 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" #>