Combining listener and connection point
A listener uses the same inbox table as a connection point. This enables you to switch. If the application needs to receive all Sync BODs you can use a listener. If at some point in time it is better to receive only specific Sync BODs, then you can create a connection point and a document flow instead. You can do this without having to change the application code, as the same inbox table is used.
Additionally, an application that is a listener can at the same time be a 'normal application', which is the system of record for a specific document. This means that the same inbox table is used for the listener and the connection point.
For example, your application is the system of record for a document called MyDocument, the application receives ProcessMyDocument and it sends AcknowledgeMyDocument and SyncMyDocument. Additionally the same application is a listener that must receive all Sync BODs. In that case, the inbox table receives messages for both roles (connection point and listener). The outbox table contains messages for the connection point role, because a listener does not publish any messages. This is shown in this picture:
In this case, be aware of these limitations:
- In ION Desk, both the Active Connection Points page and the Active Listener page have a counter for the number of unprocessed and processed messages in the inbox table. Both show the total number of messages. For example, in the example of the picture above, if the inbox contains 40 processed Sync message and 2 processed ProcessMyDocument messages, you see '42' for the Processed Messages in the Inbox counter in both pages.
- If the connection point is configured to receive a document that has the same verb as selected in the listener, the document is delivered twice to the inbox table. For example, if the connection point receives ProcessMyDocument and the listener is configured to receive all Process documents, the ProcessMyDocument message is added to the inbox twice. The messages for the listener have the listener's ToLogicalID.