WSO2 Message Broker - hierarchical Topics Publisher - wso2

Good Day.
We have a option to subscribe topics & sub Topics messages in wso2 MB by configuring [topic.#]. then we can consume all the messages both topic & sub topic.
In the same way , is there any option to publish the messages to both topics & sub topics?. I mean if publish the messages to parent topic, then it should broadcast to all the sub topics.
Is there any option available in wso2 MB ?
please assist.
Thanks,
vinoth

AFAIK, there is no such implementation for publish messages with wildcard in JMS spec even. Because topic name consider as routing key and when you publish messages. You have to be specific on routing key. Below documentation will be helpful to understand hierarchical topic in WSO2 MB.
https://docs.wso2.com/display/MB300/Managing+Hierarchical+Topics
https://docs.wso2.com/display/MB300/Creating+Hierarchical+Topic+Subscriptions

Related

Is it possible to kick off two different cloud build which are based on subscription to same topic?

currently i have a cloud-build application which is being kicked off by a pub-sub trigger , subscribing to eg. topic1
I would like to know if i can kick off another cloud-build application from subscribing to the same topic. Is there a way to configure the message (or the trigger) so that if message1 is published to topic1, then cloudbuild1 is kicked off, and if message2 is published to topic1, then cloudbuild2 is kicked off?
Kind regards
marco
When you create a subscription on a topic, all the published messages in the topic are replicated in each subscription.
Therefore, if you have TOPIC and Sub1 and Sub2, if you publish 1 message in TOPIC, you will have this message in Sub1 and Sub2.
However, you can set up a filter on messages when you create a subscription. You can set this filter only at the creation and you can't update it later. You need to delete and recreate the subscription if you want to update the filter.
In addition, you can filter only on message attributes, not on the message body content.
Therefore, with filter, think wisely your filter from the beginning and when you publish a message in TOPIC, add attributes that allow your to route the messages to the correct subscription.

How to load testing of SNS-->SQS-->LAMBDA

I have a solution
SNS-->SQS-->LAMBDA-->ES(ElastciSearch)
I want to test this with heavy load like 10K or 5K request to SNS per second.
The size of the test record can be very small (1kb) and any type of json record .
Is there anyway to test this load ?I did find anything which is native to AWS for this test .
You could try with jmeter. JMeter has support for testing JMS interfaces for messaging systems. You can use the AWS Java SDK to get a SNS JMS interface
Agree, you can use JMeter to execute load testing over SNS. Create Java Request sampler class using AWS SDK library to publish messages in SNS topic, build a jar and install it under lib/ext.
https://github.com/JoseLuisSR/awsmeter
In this repository you cand find Java Request sampler classes created to publish messages in Standard Topic or FIFO Topic, depends of the kind of Topic you need use other message properties like deduplication id or group id for FIFO topic.
Here you can find details to subscribe SQS queue to SNS topic.

pub/sub : how can I use pub sub to check message in any email account?

I am new to pub/sub on GCP and have some difficulties on understanding some concepts. So if I want to get email every time I have new message in my mailbox, can I use Pub/Sub for that? How the push notification work in that case? I understand the subscriber concepts but I have some difficulties in the publisher concepts. Can anyone help?
Although I am not familiar with the Gmail API (I am specialized mainly in GCP), a quick read over the documentation can provide some really useful insights about this topic. Also, as per your question, I think your doubts are more related to Pub/Sub itself, rather than Gmail API, so let me try to clarify some things for you.
I can see in the Gmail API documentation, that you can configure Gmail to send push notifications using Cloud Pub/Sub topics, in such a way that Gmail sends publish requests to a Pub/Sub topic whenever a mailbox update matches the configuration you established. Although I cannot get into much details about this part of the scenario, from the documentation I understand that the way to configure the Gmail push notifications is to make a watch() request with the configuration you want and pointing a Pub/Sub topic that you should have previously created. Once this is set (and also permissions are correctly configured), Gmail would keep publishing mailbox message updates for a period of 7 days (after a week, you have to re-call watch()).
In order to receive notifications, you can now forget completely about the Gmail API, and you can focus on Pub/Sub. You should create a Pub/Sub subscription (using either Pull or Push configuration, depending on your requirements), so that your client (wherever and whatever it is) receives the Pub/Sub messages that work as a notification. You may have to acknowledge the messages so that they are not retried, too.
As a side note, given that you mentioned that the Pub/Sub subscriber concepts are more or less clear to you, and you would like to know more about publishing, let me share with you some links that may come in handy for a better understanding of the environment:
Pub/Sub main concepts.
Typical Pub/Sub flow.
General guide for Pub/Sub publishers.
In the scenario you are presenting (Gmail notifications using Pub/Sub), you would have to create a topic (with the name you want, let's name it gmail_topic), and the Gmail API would be your publisher. What the watch() method would be doing, behind the scenes, is calling the publish() method to send messages (containing information about mailbox updates) to your topic gmail_topic. Messages are passed to Pub/Sub subscriptions (which you can create and bind to the gmail_topic), and they retained in each of the subscriptions for 7 days (the maximum retention period) until you consume and acknowledge them.

How to subscribe a topic in WSO2 MB 3.1.0

I've been working with the WSO2 Message Broker for a while and I clearly understood the way of publishing and consuming a message to and from a queue as well topics. According to this, it has not been mentioned anywhere how could I subscribe to a particular topic from the management console where as this particular section talks about creating durable subscriptions from the code level.
But then the older version of this has a way to subscribe from the console it self. Am i missing anything? Any help would be appreciated.
Using WSO2 MB 2.2.0 is not advisable since it is a deprecated release.
Regarding the Problem,
Subscribing to a particular topic from the management console is not a valid use case since if you subscribe to a relevant topic using the management console to which consumer the messages should be pushed to?
The subscribing you mentioned in MB 2.2.0 is to subscribe to a particular topic from the management console for WS-Eventing where you can subscribe a topic to a given event sink.
WSO2 MB no longer support this.
Thanks,
Kamidu.

Amazon AWS SNS: How to segment within a topic?

Is it possible to segment or send to a sub section of a topic (using SMS)? We have an application where we are sending "alerts" (not marketing messages) where we may have 10K names on a topic but only want to send to 1-2K. The messages are time sensitive and we won't know in advance that we'll need to send them. My original plan was to subscribe them to the topic and point of purchase and then send to just the portion that need it but I can't figure out how that might happen even using message attributes (again for SMS). I'm using SDK version 3.17 with the API version '2010-03-31'.
Individually-addressable endpoints are only usable for Mobile Push. All of the other transports available through SNS are topic-centric only -- all topic subscribers receive all messages for HTTPS, Email, SQS, and SMS.
The answer is actually found in the "mobile push" section of the FAQ, presumably because those other transports were already established with this limitation when SNS introduced mobile push, which has a feature not available for other transports.
Q: Does SNS support direct addressing for SMS or Email?
No. At this time, direct addressing is only supported for mobile push endpoints (APNS, GCM, ADM, WNS, MPNS, Baidu)
http://aws.amazon.com/sns/faqs/#mobile-push-notifications