Which is the appropriate way of representing a queue processor in a UML sequence diagram?
I want to represent in the same diagram two systems that are loosely coupled through a queue. The first system, performs some actions and insert an action in a queue, the other system is always listening and when the event appears in the queue, it dequeues the event and processes it, generating new actions. They are both in the same diagram because it is to represent an integration use case that shows how both work together.
Should I create a life line representing the queue?
Should I represent the "listening" process as a loop box containing: a self-message with the label "listen", self-message for processing message and messages representing the sending of the outcome.