Publish/Subscribe with RabbitMQ over HTTP - c#

I have a requirement where messages should be published/subscribed over http with Advanced Message Queuing Protocol (AMQP - I am using RabbitMQ C# client), just like the sample chat application works with its json_rpc_channel plugin.
Please guide me through any valuable resource available to you.

Official .NET SDK
EasyNETQ - Easy to use wrappers
If you can post specific requirement, pointers can be provided
Update:
Publish
Subscribe

Related

What Project template to use when developing a c# amqp microservice

How should I build a c# app that's based on amqp instead of rest. A .NET Core webapi expects requests via standard Http and not messages from amqp servers like rabbitmq. I'm trying to develop a microservice using c# but the way the rabbitmq client works does not seem to fit inside of a .NET Core rest api, so is there a package that can make this happen or is there a .NET project template specific for this use case.
Use .NET Generic Host in ASP.NET Core - see here for setup etc.
You can then use messaging frameworks like NServiceBus, MassTransit or EasyNetQ to interact with the broker (RabbitMQ in your scenario). I've used MassTransit quite a bit and highly recommend - really makes interacting with the broker a lot easier. I've also heard good things about NServiceBus, but haven't used it personally.
You can use Worker services I have used it for other message queue technologies. Here is a link to the Microsoft documentation.
Here are some articles I found, in particular to RabbitMQ
https://www.programmingwithwolfgang.com/rabbitmq-in-an-asp-net-core-3-1-microservice/
https://codeburst.io/get-started-with-rabbitmq-2-consume-messages-using-hosted-service-e7e6a20b15a6

Solace JNDI/JMS Syntax for C# .NET

A vendor is using Solace to send messages. I have obtained a SubscriptionId using web service call, that I supposed to be submitted to the Solace server.
Using the documentation and sample code at dev.solace.com, I have been able to connect a session. However, I am lost as to how to go to the next step which is to subscribe to what I believe is a queue using a connection factory, jndi factory an jms destination name.
The sample shows this:
Session.Connect(ContextFactory.Instance.CreateQueue(Topic), true);
But from what I can tell, that won't work as the vendor wants jndi/jms, and the Solace documentation has no .NET code for jndi/jms, which leaves me guessing.
Help!
Please use the JMS API instead of the .NET API in order to perform JMS.
The .NET API does not do JMS.
Note that you can send/receive messages using the .NET API that's inter-operable with the JMS API.
However, since you have a hard requirement to use JMS, your only option is to use the JMS API.
As It turns out, the jndi/jms information delivered by the host for configuration was unneeded. What was necessary was to connect to the queue and receive the messages.

Implementing WebSocket on Azure Server and UWP client

For the development I'm doing I need real time communication between server and clients.
As far as I understand, the best way is to go WebSocket. That's ok but now I'm looking for a way to implement this kind of communication on Server (hopefully an Azure WCF Web Role, at last an Azure Asp.Net MVC, but I do prefer WCF) and on client (UWP Windows10).
I'm new on this kind of technology so I'm looking for advices in best APIs to use for both server and client, documentation and samples.
Thank you for helping out
-g
Your best friend for this is SignalR:
http://signalr.net/
This is a library that you can basically use from anywhere. It is generally used in ASP.NET projects, but not restricted to it in any form. The following thread provides you with the answer to how you can host signalR on its own:
WCF Service with SignalR
As #Pedro said, SignalR is your friend ..
In this article, you'll find an example for how to use it in Azure platform:
https://azure.microsoft.com/en-us/blog/introduction-to-websockets-on-windows-azure-web-sites/
And for the UWP, we do have support for that, this is the documentation and en example for that:
https://msdn.microsoft.com/en-us/library/windows/apps/mt186447.aspx
UPDATE:
Here's SignalR client sample for .NET, you might need it:
http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-net-client

How to do Pub/Sub on WSO2 Message Broker with WCF

There seems to be very little information on interacting with the WSO2 products from WCF or .Net in general. I am attempting to subscribe to a Topic which is defined in the WSO2 Message Broker, but I have no idea where to start. Eventually, I'd like to publish events from a C# application, but again, I could use some help finding a starting point.
I've successfully coded something up using the RabbitMQ .net libraries, but only for reading/writing to a queue, not a topic. Thanks in advance for any help.
I think you can do this using WS-Eventing API by writing a C# client. You can refer the section on WS-Eventing in this article. Unfortunately, the example code is in Java.

Resources for IBM WebSphere MQ and .NET implementation

I need help with implementing IBM WebSphere MQ for a system where the queue is supposed to send the XML messages to a SQL database. May please help me with resources and video tutorials for the matter in hand. The system will be in C#
Thanks!
Message Service Client for .NET a.k.a XMS .NET is now part of WebSphere MQ v701. You can find latest documentation on XMS .NET here. XMS .NET gets installed along with MQ Client from v701 on-wards.
How are you wanting to access MQ? Are you using JMS or MQI?
There are a couple different ways to access MQ from .NET. The first way is through the native MQ interface known as MQI. The second way is through a JMS implementation created by IBM called XMS.
The queue is not going to write anything into a database for you. You are are going to need to create a listener application that does that.
EDIT:
If you want to use JMS then you should take a look at the doc link that Shashi posted below. here
You will want to look at the docs under "Message Service Client .NET, Version 2.0.0" --> "Developing XMS Applications" --> "Writing XMS .NET applications"
Also take a look at the sample applications that are packaged with the client.
Essentially what you are going to end up doing is creating a connection to the queue manager (either remote or local depending on your use case), creating a destination object that will represent the queue you are trying to work with on the queue manager, and then creating a listener to receive messages from the queue (either sync or async depending on your use case).

Categories