views:

124

answers:

0

I've got my xmpp server with which I intend to publish messages to my subscribers on the gmail server. I am able to get those messages when the subscriber belongs to my jabber server but when I try to publish messages the google users are unable to get the message.

However I am able to fetch the messages using the pubsub.get_items_from(node, no_of_message) however my subscriber event callback does not get called. Are there any configurations that I missing.

This is my subscribers code which works for subscribers belonging to my jabber server. Im using xmpp4r for this.

pubsub = PubSub::ServiceHelper.new(client, service)
pubsub.subscribe_to(node)
subscriptions = pubsub.get_subscriptions_from_all_nodes()
puts "subscriptions: #{subscriptions}\n\n"
puts "events:\n"

# set callback for new events

pubsub.add_event_callback do |event|
begin
event.payload.each do |e|
puts e,"----\n"
end
rescue
 ....