publish-subscribe

Using a message broker with end user clients directly

夙愿已清 提交于 2019-12-24 23:06:15
问题 I want to find a way to implement push messages from a server to multiple end user clients with the same message. One of the options I found was to use a message broker and use it to implement the pub/sub pattern. What I'm not sure about is what supposed to be considered a consumer in such a scenario. What I thought that the general architecture is when using a message broker is: End user clients <----> Message broker <---> Server (The clients and server can also speak to one another on

Publish with Python to Azure IoT Hub - Subscribe with C# not working

吃可爱长大的小学妹 提交于 2019-12-24 20:26:48
问题 I publish with M2MQTT Paho Python library on the device as follows: msg = "POS {} {} {} {} {} {} {}" msgtosend=msg.format(tagNum, tagID, x_pos, y_pos, z_pos, qos, unk) print(msgtosend) # qos=1 - (must be when clean_session is False) mqttinfo=rpiclient.publish("dwm/position", msgtosend, 1) if mqttinfo.rc != 0: print("Publishing message with ID {) failed. Error Code={}".format(mqttinfo.mid, mqttinfo.rc)) Then, I am trying to read the data in C# application again with M2MQTT C# library (after

Lagom Publish message with Kafka

半城伤御伤魂 提交于 2019-12-24 20:19:42
问题 Only one way of publishing is described here. There is another way? The example I need to make a publication with dynamic topic id and custom event without persistentEntityRegistry? And how do I can publish the event with eventId? @Override default Descriptor descriptor() { return named("helloservice").withCalls( pathCall("/api/hello/:id", this::hello), pathCall("/api/event/:id", this::pushEventWithId) // id - eventId ) .withTopics( topic(GREETINGS_TOPIC, this::greetingsTopic) ) .withAutoAcl

Is there an event pub/sub framework for angular? [closed]

谁都会走 提交于 2019-12-24 16:26:39
问题 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 4 years ago . I am coming from a WPF background where in Prism you have the IEventAggregator interface. You define events that you can subscribe to from controllers, and then you publish the event from another controller. It is a way to communicate between controllers that do not know about each other. Is there anything

Rebus subscriber-publisher system. Process message only by single subscriber

浪尽此生 提交于 2019-12-24 15:37:58
问题 I have system with one publisher several subscribers. But some messages should be processed only by single subscriber. In my case publisher sends message about changing data in database, all subscribers has access to the same database, but I don't need them all change the same data. How can this be accomplished using rebus? PS. Forgot to mention. I can't subscribe to the message only with one subscriber, because subscriberss can go online/offline all the time. 回答1: But some messages should be

JMSTemplate check if topic exists and get subscriber count

北慕城南 提交于 2019-12-24 08:58:52
问题 I have been looking for some documentation/example for checking if a dynamically created topic exist and if it does, how to get the subscriber count for the topic. I use following code for sending out message to a topic - jmsTemplate.send(destination, new MessageCreator() { @Override public Message createMessage(Session session) throws JMSException { TextMessage message = session.createTextMessage(); message.setText(commandStr); return message; } }); This code seems to create the topic and

I want to get new Gmail notify by Google Cloud Pub/Sub API

随声附和 提交于 2019-12-24 07:18:38
问题 I have had very bad experiences with googleapis, lost one week but failed so I open questions to find the help of everybody. After creating a topic & subscription (with endpoint URL) from PUB/SUB of Google Cloud Flatform Console, I used nodejs with code bellow : var gmail = google.gmail({ auth: {---my auth---}, version: 'v1' }); gmail.users.watch({ userId: "me", resource: { topicName: "projects/responsive-hall-xxxx/topics/xxxx", labelIds: ["INBOX"] } } But got the error 403: { domain: 'global

Keep a MQTT Client Connection always active

瘦欲@ 提交于 2019-12-24 06:04:18
问题 I am using CloudMQTT as a MQTT broker in my Pub-Sub based application. I am using my publisher to publish data to the CloudMQTT server over a topic , and I plan to subscribe to the broker on my webpage to recieve the transmitted information. I am using this procedure to create a Client (subscriber): https://www.cloudmqtt.com/docs-php.html Code goes as follows: // subscribe.php require("phpMQTT.php"); $host = "hostname"; $port = port; $username = "username"; $password = "password"; $mqtt = new

Getting Redis Master address from Sentinel C#

Deadly 提交于 2019-12-24 04:34:57
问题 I am trying to use the sentinel to get the connection address of my master, the problem is that the sentinel sends the address only on failover, but if my master is down and the slave was promoted master and my application is just booted it would not know and won't get the message that the original master is down, is there any way to communicate with the sentinel and ask him who he thinks the master is using C# servicestack redis client? 回答1: Had to do it the hard way, I imitate the redis-cli

There's invalid syntax in pub.py

旧巷老猫 提交于 2019-12-23 16:17:03
问题 The followed method is defined in the pubsub.py which is a python file in the site-package pubsub. When I try to use this, the pycharm tells me this is invalid syntax with an arrow pointing to '->'. I don't why and I have installed the pypubsub. def getDefaultPublisher() -> Publisher: """ Get the Publisher instance created by default when this module is imported. See the module doc for details about this instance. """ return _publisher 回答1: You have a Python version mismatch. This version of