Consumes AMQP Messages from Broker using AMQP 0.9.1 protocol. Each message is received from broker will be emitted as own FlowFile to ‘success’ relationship.
amqp, rabbit, get, message, receive, consume
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property is considered “sensitive”, meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.
|Name||Default Value||Allowable Values||Description|
|Queue||The name of the existing AMQP Queue from which messages will be consumed. Usually pre-defined by AMQP administrator.|
|Host Name||localhost||Network address of AMQP broker (e.g., localhost)|
|Port||5672||Numeric value identifying Port of AMQP broker (e.g., 5671)|
|Virtual Host||Virtual Host name which segregates AMQP system for enhanced security.|
|User Name||guest||User Name used for authentication and authorization.|
Password used for authentication and authorization.
Sensitive Property: true
|AMQP Version||0.9.1||* 0.9.1||AMQP Version. Currently only supports AMQP v0.9.1.|
|success||All FlowFiles that are received from the AMQP queue are routed to this relationship|
This processor consumes messages from AMQP messaging queue and converts them to a FlowFile to be routed to the next component in the flow. At the time of writing this document the supported AMQP protocol version is v0.9.1.
The component is based on [RabbitMQ Client API](https://www.rabbitmq.com/api-guide.html# “”) [The following guide and tutorial](https://www.rabbitmq.com/getstarted.html# “” may also help you to brush up on some of the AMQP basics.
This processor does two things. It constructs FlwFile by extracting information from the consumed AMQP message (both body and attributes). Once message is consumed a FlowFile is constructed. The message body is written to a FlowFile and itscom.rabbitmq.client.AMQP.BasicProperties are transfered into the FlowFile as attributes. AMQP attribute names are prefixed withamqp$ prefix.
The following is the list of available standard AMQP properties which may come with the message: (“amqp$contentType”, “amqp$contentEncoding”, “amqp$headers”, “amqp$deliveryMode”, “amqp$priority”, “amqp$correlationId”, “amqp$replyTo”, “amqp$expiration”, “amqp$messageId”, “amqp$timestamp”, “amqp$type”, “amqp$userId”, “amqp$appId”, “amqp$clusterId”)
At the time of writing this document it only defines the essential configuration properties which are suitable for most cases. Other properties will be defined later as this component progresses. Configuring PublishAMQP:
Queue - [REQUIRED] the name of AMQP queue the messages will retrieved from. Usually provided by administrator (e.g., ‘amq.direct’)
Host Name - [REQUIRED] the name of the host where AMQP broker is running. Usually provided by administrator (e.g., ‘myhost.com’). Defaults to ‘localhost’.
Port - [REQUIRED] the port number where AMQP broker is running. Usually provided by the administrator (e.g., ‘2453’). Defaults to ‘5672’.
User Name - [REQUIRED] user name to connect to AMQP broker. Usually provided by the administrator (e.g., ‘me’). Defaults to ‘guest’.
Password - [REQUIRED] password to use with user name to connect to AMQP broker. Usually provided by the administrator. Defaults to ‘guest’.
Virtual Host - [OPTIONAL] Virtual Host name which segregates AMQP system for enhanced security. Please refer to [this blog](http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html# “”) for more details on Virtual Host.