You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Allan C." <al...@gmail.com> on 2016/10/22 04:08:50 UTC

camel-xmpp Producer for Firebase Cloud Messaging

Hi all,

After some testing with the existing camel-xmpp with FCM, I got it to work
with a "Raw/Direct" Producer. Thus, I've added some classes for it to work.
The changes and addition can be viewed here
<https://github.com/allancth/camel-xmpp-fcm>.

With the connectionConfig should be configured as below for FCM to work:
<bean id="xmppConnectionConfigurationFactory"
class="com.allancth.circinus.server.XmppConnectionConfigurationFactory">
<property name="host" value="${xmpp.host}" />
<property name="port" value="${xmpp.port}" />
<property name="serviceName" value="${xmpp.serviceName}" />
<property name="securityMode" value="disabled" />
<property name="reconnectionAllowed" value="true" />
<property name="rosterLoadedAtLogin" value="false" />
<property name="sendPresence" value="false" />
</bean>
<bean id="connectionConfiguration"
class="org.jivesoftware.smack.ConnectionConfiguration"
 factory-ref="xmppConnectionConfigurationFactory"
factory-method="createConnectionConfiguration" />

And the endpoint:
<from
uri="xmpp://{{xmpp.host}}:{{xmpp.port}}?connectionConfig=#connectionConfiguration&amp;doc=true&amp;password={{xmpp.prop.key}}&amp;user={{xmpp.prop.user}}&amp;resource={{xmpp.prop.resource}}"
/>

Regards,
Allan C.