HTTP Rest API receive 'push request', this gets processed in PushNotificationSenderEndpoint.send()
, which eventually calls an async EJB (NotificationRouter.submit()
) which performs a grouping/mapping and fires a CDI event per Variant.
This Event is received in the MessageHolderWithVariantsProducer.queueMessageVariantForProcessing()
method, which basically sticks the submitted event into a transactional JMS send, based on the variant type a different queue is selected (mainly to keep things separated). The JMS listener MessageHolderWithVariantsConsumer.onMessage()
reads from these queues, and fires a different CDI event, which kicks in the TokenLoader
.
The TokenLoader generally iterates over all variants (for a given type, see the grouping/mapping done in NotificationRouter
), and starts to query tokens from the database, as a steam.
The tokens are in different batches, with different default sizes per Push_Network, to not overflow the push network (e.g. google (non topic case) only allows 1