The AppDynamics .NET Agent automatically detects RabbitMQ backends based upon calls from instrumented tiers. RabbitMQ exit points are methods that publish or push messages to a queue. RabbitMQ entry points are methods that listen or poll for new messages in the queue.
If you are using NServiceBus over the RabbitMQ transport, see NServiceBus Backends for .NET.
Exit Points and Backend Naming
The agent discovers a RabbitMQ backend exit point when your application sends a message to the queue using the
By default, the agent names the RabbitMQ backend for the exchange parameter of the
In this case the agent names the queue MyExchange.
You can refine the backend name to include some or all segments of the routing key. To configure RabbitMQ naming you must be familiar with your implementation RabbitMQ exchanges and routing keys. See RabbitMQ Exchanges and Exchange Types.
Refine backend naming
Register the rmqsegments node property. For instructions on how to set a node property, see App Agent Node Properties.
Description: "Configure RabbitMQ naming to include routing key segments."
The routing key is a string. The agent treats dot-separated (".") substrings of the routing key as segments. Set the value to an integer that represents the number of routing key segments to include in the name.
In the following example the routing key is "abc.def.ghi". Set the rmqsegments value to "2" to name the queue "MyExchange.abc.def".
After you save the node property, the Controller sends the configuration to the agent. After some time the RabbitMQ backend shows up with the new name.
The agent discovers RabbitMQ backend entry point when your application polls the queue. AppDynamics auto-detects RabbitMQ based upon the following patterns:
The agent detects the pattern below where the application periodically polls the message queue using the
BasicGet() method. The call timing is limited to the time spent inside the
while loop. The timer only starts when the BasicGet result returns a value at line 4. The timer ends when the next BasicGet executes. In this example, the application polls every five seconds, so the execution time equals the time in the
if loop plus five seconds.
The agent detects the
HandleBasicDeliver() method for custom implementations of the
IBasicConsumer interface. In this case, the call timing reflects the execution time for the HandleBasicDeliver method.