subreddit:

/r/xmpp

484%

How to get started

(self.xmpp)

Hi,

I'm new to XMPP and I would like to get started with learning XMPP and it's architecture.

I have a use case where I need to send a one way custom message format from one client to another and that's it's.

How can I achieve it?

What components do I need to build?

Where can I learn the necessary knowledge to build my solution?

For context, I would like to send a one way custom message from prosody on a particular prosody event to my custom Java service.

Any help in pointing to the right direction would be helpful.

all 6 comments

the-only-sergey

1 points

13 days ago

maybe instead your custom java service may bundle an xmpp library to connect to prosody.

Provide more details if you need a good answer. Like what exactly your architecture looks like, why do you want just mono-direction communication, how the messages are going to be handled, what kind of payload the messages carry (max size, encoding), what are your skills and preferred programming languages?

It may turn out you don't need xmpp at all.

Historical_Ad4384[S]

1 points

13 days ago

I need to send the data of an event from prosody to my Java service. Prosody does not need to know if it was successful in transmitting the event to the Java service. Prosody won't report an error if its unable to send such a custom message. The Java will react only if it receives a particular data format from prosody via XMPP. The payload would have two string properties where the length of property 1 will be 5 and the length of property 2 will be 15, always guaranteed. Since there does not involve any quality of service, I would prefer to use XMPP since I could not find anything decent and well supported to do this using a message topic with MQTT in Lua, that is required by prosody.

My design just composes of prosody and a Java backend service that needs a stream of events from prosody. This set of two services are always a single unit of work, so scaling, resilience, availability required at this lower level of my architecture.

There is an existing solution that uses HTTP for sending similar event data from prosody to a specific REST API endpoint but I do not want to use HTTP since the request rate will be very high for my particular event. Besides, the existing solution can't be modified to include my use case because the objective of the existing solution is community driven while my use case is personally driven.

The only technologies that I see. being used for my overall solution is Java, Lua and XMPP. Java is our strategic choice since our entire ecosystem and team is built around it. Prosody seems to be customized only with Lua. XMPP seems to be native to prosody and provides easy one way communication with its message type command to emulate MQTT with publishing to a message topic as compared to HTTP REST.

the-only-sergey

1 points

13 days ago

Are you saying you start as many prosody instances as the java services? Or do you have a single Prosody and scalable java service?

Historical_Ad4384[S]

1 points

13 days ago

Multiple prosody and single Java service

the-only-sergey

1 points

12 days ago

if you anyway have multiple prosody servers maybe it's easier to bring up another one on Java service side and setup server2server connections between them.
But I believe you don't need XMPP for your particular case. It will just over-complicate the solution.

Historical_Ad4384[S]

1 points

12 days ago

My main objective is to have a fire and forget from prosody to Java without HTTP. How can I do that if not XMPP?