Available as of Camel 2.8
The apns component is used for sending notifications to iOS devices. The apns components use javapns library.
The consumer is configured with 3600 seconds for polling by default because it is a best practice to consume feedback stream from Apple Push Notification Servers only from time to time. For example: every 1 hour to avoid flooding the servers.
The feedback stream gives informations about inactive devices. You only need to get this informations every some hours if your mobile application is not a heavily used one.
Maven users will need to add the following dependency to their
To send notifications:
To consume feedback:
You can append query options to the URI in the following format,
Exchange data format
When Camel will fetch feedback data corresponding to inactive devices, it will retrieve a List of InactiveDevice objects. Each InactiveDevice object of the retrieved list will be setted as the In body, and then processed by the consumer endpoint.
Camel Apns uses these headers.
Camel Xml route
Camel Java route
Create camel context and declare apns component programmatically
ApnsProducer - iOS target device dynamically configured via header: