Is it a good idea to use a message queue as websocket server in production (instead of Java EE #ServerEndpoint)? [closed] - websocket

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Is it a good idea to use a message queue as websocket server in production (instead of Java EE #ServerEndpoint)?
It would establish a loose coupling towards the JS client and perhaps reduce the load from the application, but are there major disadvantages? Should one really expose a MQ over the web?

One can send messages to websocket clients from within a java web application without the help of a message queue. And this is a good enough solution as long as you do not need the additional features that message queues have to offer (QoS 1/2, Retained messages, Last Will and Testament, ... for some more benefits of using a mq see for example: http://www.hivemq.com/mqtt-over-websockets-with-hivemq/)

Related

Spring Integration Debug Messages [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am interested to know, is there is a manner to configure the logger os spring integration package in debug mode but without messages (quite large content).
My problem now resides more on understand my configuration than what i have done with the data.
Kind Regards.
See Wire-Tap pattern and Logging Channel Adapter.
The first one will let to to track a message journey through you flow and the second one will let you to configure whatever you want to log with its logExpression option.
See docs for more info:
https://docs.spring.io/spring-integration/docs/current/reference/html/messaging-endpoints.html#logging-channel-adapter
https://docs.spring.io/spring-integration/docs/current/reference/html/core.html#channel-wiretap

When is it better to use websockets versus a message broker such as Kafka? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last month.
The community reviewed whether to reopen this question last month and left it closed:
Original close reason(s) were not resolved
Improve this question
As a product scales, APIs and two tier architecture incurs bottlenecks, data contention, downtime. Messages can become lost, if there are thousands or millions of requests & activity
What makes websocket connections beneficial vs Kafka? What are the best use cases for each?
Is there an example such as a large scale chat application where a hybrid of both technologies are necessary?
Websockets should be used when you need real-time interactions, such as propagating the same message to multiple users (group messaging) in a chat app.
Kafka should be used as a backbone communication layer between components of a system. It fits really well in event-driven architectures (microservices).
I see them as 2 different technologies which have been developed for 2 different purposes.
Kafka, for example, allows you to reply messages easily, because they are stored on the local disk (for the configured topic retention time). Websockets are based on TCP connections (two-way communication), so they have a different use-case spectrum.

Is it okay to use one RabbitMQ channel for all goroutines? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I'm doing a message publisher and a receiver to/from rabbitmq queue.
I'm planning to use one rabbitmq channel for publishing messages and one for fetching, but i also want my code to be asynchronous, is it the right way to use one rabbitmq channel per multiple goroutines?
I'm not a golang-guy, by I use every day RabbitMq with .Net driver; .Net driver channels (an abstraction that encapsulate interactions with queue/exchange and message publishing/subscribing) are very similar to golang RabbitMq channels, so I think my answer can help you.
While connections are tread safe by design and are supposed to be shared between threads, channels are not: so, if different aysnchronous goroutines can be run in different threads (this is up to you: I don't known how golang runtime works) you should not share the same channel instance between them.
I hope this can help you.

ServiceMix ESB as Bus or Container? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Should we use ServiceMix ESB as bus (i.e. communication channels) or as container to host services?
My current company host services (JMS/SOAP/RESTFUL etc, built by Java) in their own separate containers/servers etc, then each of these communicate to each other via the ServiceMix ESB, by adding extra bindings.
Is this a correct approach?
Should we migrate all existing services to become OSGI bundles, then host on ServiceMix?
I'd say it depends more on your current system land-scape. How do you handle failover and such. I personally would have all my service on that machine and if a routing is needed would try to do an "in-memory" routing instead of doing external service calls, would be much faster. On the other hand this again depends purely on how your application stack is working and if you have "time-critical" service calls that would perform better if run inside the same jvm. So actually there can't be a "silver-bullet" approach on this. As usual it depends ...

How to send SMS in my application with Spring? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I wanna send SMS with JMS and Spring ,How can I do this ?
Could you give me tutorial or sample ,may be?
Before starting JMS and Spring you should probably check if it would work out at all.
Unless you have a JMS-to-SMS gateway programming won't help at all. First you have to find a reseller or provider for your SMS service. Afterwards check what APIs they provide.
If they happen to provide a JMS gateway start reading the Spring JMS manual.
You would probably need some JMSs provider as well. Check MQ or some smaller implementation like ActiveMQ.
First of all read this. It is important that you first under stand the beans that are required and there roles.
If your searching for samples you need to find out what JMS technology your going to be using:
Tibco, MQ etc. If this a test your going to run locally then ActiveMQ can get you up and running quickly:
MQ Tutorial 101

Resources