messaging

Best solution for Java HTTP push (messaging) [closed]

女生的网名这么多〃 提交于 2019-12-03 19:22:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . We want to push data from a server to clients but can only use HTTP (port 80). What is the best solution for messaging? One idea is Comet. Are there other ideas or frameworks which offer lets say JMS over HTTP. (Yes, ActiveMQ supports it too, but waggly IMHO. And JXTA supports it too but the configuration is

Private messages with Faye and Rails

99封情书 提交于 2019-12-03 19:22:31
I'm using the faye gem menitioned in the railscast allowing apps to push messages. Problem is it pushes messages to all chat clients that are open. I need them to be private. It's possible to get private messaging with faye but it's url based. For example all messages will be sent to site.com/foo . But, in my model the chat doesn't have a specific url. Because chat is just a collection of messages sent to you by that user. So if you're logged in as adam site.com/messages/eve would allow you to talk to eve but for eve it's the reverse. site.com/messages/adam . So URL specific private chat is

JMS AUTO_ACKNOWLEDGE when is it acknowledged?

感情迁移 提交于 2019-12-03 18:28:17
问题 I have tried to google this, but have not been successful. If I am using AUTO_ACKNOWLEDGE , and I have a consumer client written in Java, when is the message acknowledged? I am using a MessageListener which contains an onMessage method. Is the acknowledgement sent back to the server before onMessage or after onMessage completes or at some other point? Thanks in advance for any help anyone is able to provide! 回答1: Please check this one. With AUTO_ACKNOWLEDGE mode the acknowledgment is always

Java Messaging : Difference between ActiveMQ, Mule, ServiceMix and Camel

99封情书 提交于 2019-12-03 18:20:44
问题 I am new to Messaging and want to know the difference between ActiveMQ , Mule , ServiceMix and Camel Anyone knows how each of these product is different? Thanks in advance ! EDIT: Also would like to know any good place/resource to learn these things. 回答1: ActiveMQ is a message broker which implements the JMS API and supports a number of cross language clients and network protocols. It lets you implement queues or topics and write listeners or subscribers to respond to queue events. Mule and

RabbitMQ wait for multiple queues to finish

房东的猫 提交于 2019-12-03 16:34:37
问题 Ok here is an overview of what's going on: M <-- Message with unique id of 1234 | +-Start Queue | | | <-- Exchange /|\ / | \ / | \ <-- bind to multiple queues Q1 Q2 Q3 \ | / <-- start of the problem is here \ | / \ | / \|/ | Q4 <-- Queues 1,2 and 3 must finish first before Queue 4 can start | C <-- Consumer So I have an exchange that pushes to multiple queues, each queue has a task, once all tasks are completed, only then can Queue 4 start. So message with unique id of 1234 gets sent to the

Microservices: REST vs Messaging

北城以北 提交于 2019-12-03 16:27:19
问题 I heard Amazon uses HTTP for its microservice based architecture. An alternative is to use a messaging system like RabbitMQ or Solace systems. I personally have experience with Solace based microservice architecture, but never with REST. Any idea what do various big league implementations like Amazon, Netflix, UK Gov etc use? Other aspect is, in microservices, following things are required (besides others): * Pattern matching * Async messaging.. receiving system may be down * Publish

Kafka Java consumer never receives any messages

不羁岁月 提交于 2019-12-03 15:52:47
I'm trying to setup a basic Java consumer to receive messages from a Kafka topic. I've followed the sample at - https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example - and have this code: package org.example.kafka.client; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import kafka.consumer.ConsumerConfig; import kafka.consumer.KafkaStream; import kafka.javaapi.consumer.ConsumerConnector; public class KafkaClientMain { private final

How to open attachment list of media?

余生颓废 提交于 2019-12-03 15:02:38
In Android messaging, when click on attach it open the list of content provider like Camera, Gallery, Audio, Video etc . How to open the same list on button click? Like this : Femi What you want is actually a little complex: you need to call a method like this in your Activity private void showAddAttachmentDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setIcon(R.drawable.ic_dialog_attach); builder.setTitle(R.string.add_attachment); AttachmentTypeSelectorAdapter mAttachmentTypeSelectorAdapter = new AttachmentTypeSelectorAdapter(this,

How to selectively delete messages from an AMQP (RabbitMQ) queue?

久未见 提交于 2019-12-03 12:36:42
问题 I'd like to selectively delete messages from an AMQP queue without even reading them. The scenario is as follows: Sending side wants to expire messages of type X based on a fact that new information of type X arrived. Because it's very probable that the subscriber didn't consume latest message of type X yet, publisher should just delete previous X-type messages and put a newest one into the queue. The whole operation should be transparent to the subscriber - in fact he should use something as

How to implement a competing consumer solution?

此生再无相见时 提交于 2019-12-03 11:36:50
As a exercise I'm trying to find an example which implements competing consumer. many producers - > MSMQueue <- competing consumers So far I did not find any documentation on how to achieve this. My first attempt to figure out how is implemented in MassTransit or NServiceBus failed to many layers of indirection. Any help will be greatly appreciated. Cocowalla With MassTransit and MSMQ you can achieve this using the Distributor component. Note that if you use MassTransit with RabbitMQ instead of MSMQ, you can implement a competing consumer scenario without using the Distributor, simply by