Latest Azure Java client SDK can't check that a Subscription exists - azure-servicebus-topics

I have been trying to write a Topic Subscriber which can check to see if it's subscription and rules already exist. And if so just connect otherwise create the subscription, but the new 1.1.0 client API doesn't have a way to query a Topic for it's subscriptions. And the management API requires a AD authentication which my app should not need, it only has access to the connection string. Is there a way to do what I need to or do I have to go back to the 0.9.x version of the service bus APIs? Which seem to have more functionality than the 1.x APIs.

Related

Can I publish an event into Cloud Pub/Sub outside from GCP

Can I publish an event into Cloud Pub/Sub outside from GCP?
Let me clarify my query a bit. In AWS as we are able to publish events into SNS topics directly by invoking REST API via API Gateway from the non-cloud client (https://github.com/cdk-patterns/serverless/blob/master/the-big-fan/README.md), is there any such method in GCP to publish an event into Pub/Sub?
I can see there is a similar question in SO (Acces Google Pub/Sub from outside of GCP), but it is not fully answered my question I believe. Yes authentication is required and it is a cross-cutting functionality, but what is the basic technic to publish an event in Pub/Sub outside from GCP
Yes, you can publish a message into a topic, and then pull it, or even have PubSub deliver it to you through a Push subscription.
When publishing a message, or pulling it from a subscriber, you can access PubSub through the REST or RPC API. In addition, you can use one of the client libraries.
Here you can find an example of how to publish a message using the gcloud CLI tool, an example with the REST API, python and java among other programming languages.
As mentioned in the question referenced, you will need to authenticate in order to either publish a message, or pull it. You can use the quickstart as a reference on how to do so. Notice that you can follow the quickstart from any computer or VM outside GCP.
Finally, if you're using Push subscriptions to receive your messages, your endpoint will need to be a publicly accessible HTTPS address and have a valid SSL certificate signed by a certificate authority. Again, this endpoint can live outside GCP.

Is it necessary to use Amazon SNS when using Firebase Cloud Messaging (FCM) on AWS to send notifications?

I have an existing mobile app that can receive push notifications and I have an existing backend application that exposes an API for sending notifications to the app. The backend application uses Firebase Cloud Messaging (FCM), so it could be considered a wrapper around FCM. My backend application uses the Firebase Admin SDK to create messages and send them to Firebase. My customers hit an API exposed by my backend application (so, if we assume that the customer is using Postman, then the flow for sending a message is: Postman->My backend application->Firebase->Mobile app).
Until now I have been running my backend application on a local server, and it works fine. But now I need to deploy this on AWS. My question is: is it necessary to use Amazon SNS or not? I don't really need any additional functionality from AWS, I just want AWS to permit the required communication.
For example, I dont need to go to an AWS interface to enter the token to send messages to my phone. I already have an API exposed through my backend for sending messages. So, should I even bother to set up SNS?
I know that at a minimum I will have to make my firebase project google credentials available to my instance on AWS (in a file located at the path specified using GOOGLE_APPLICATION_CREDENTIALS). What other configuration steps would be needed? Thanks a lot.
After some investigation I found that it is not necessary to use Amazon SNS to achieve what I wanted to achieve.
I was able to deploy my server application (which uses Firebase Cloud Message) to AWS, and the messages arrive on the mobile phones without any problem.
I initialized my backend application using the steps described on the Google Firebase site: https://firebase.google.com/docs/admin/setup

How to Authenticate an External Publisher in Google Pub/Sub?

I am trying to obtain data from a web service (publisher).
The web service lets me send the data (message) to any url through a webhook. My plan is to send it to a Google Pub/Sub topic.
However, Google Pub/Sub is not recognizing this third-party web service. It is returning a http 401 response code, meaning that the web service is not authenticated.
My question is, How can I authenticate it?
Authentication for requests made to Google Cloud Pub/Sub or any other of the Google Cloud Platform services can be accomplished in a couple of different ways. In your case, where you want to make a direct request via the REST API, you'll need to create a service account and authenticate via OAuth 2.0. The Using OAuth 2.0 for Server to Server Applications guide details the process. If the web service you are using supports OAuth 2.0 authentication for requests it makes, then you should basically be set. If it does not, then you will have to take care of acquiring access tokens (and acquiring new ones when they expire) manually.

Google Cloud Api Authorization

I want to use google cloud pub sub to implement Facebook kind of notifications in blog application which has following architecture
I have a both web and android device as a client for rest services exposed.
Those rest services has been secured using OAuth2 (spring security).
When user create a blog then if someone comment on that post, the concern owner can get the notifications. Only authorized user can create a post or comment and the concern person can see the notifications
I don't want user to authorize again with Google so how I can incorporate the api's in my architecture using pull notification
You typically wouldn't use Google Cloud Pub/Sub in the client in the type of setup you describe. Cloud Pub/Sub isn't designed to scale to a number of subscriptions that are on the order of number of phones. Instead, you'd want to use Firebase Cloud Messaging. Firebase has a model that handles registration of devices to receive messages that is more in line with what you are thinking of, e.g., Set Up a Firebase Cloud Messaging Client App on Android and
Implementing a Firebase Cloud Messaging Client on Chrome
What you may use Cloud Pub/Sub for is communication between different services. For example, perhaps the service that handles blog posts publishes messages on a Cloud Pub/Sub topic that your notification service subscribes to. The notification service would process the message and send out Firebase Cloud Messaging messages to end users as appropriate.

Email Notification to subscribers while publishing an api in WS02 API Manager

Is there a possibility to notify the subscribed users via email that a new api has been published & is available in the api store
There is NO such option.
However in case of a new version of the API, we can do something to alert the user who are already subscribed to the old version.
For more info visit Managing an API Lifecycle
And for the list of features that APIM provides, APIM Features