Check connection between two Queue managers - c#

I have an application that communicate with local IBM MQ Queue Manager that
is also connected with a remote Queue Manager.
Is there an event in the IBM c# API that can notify me when the connection between the local and the remote queue manager fell?
If there isn't what is the best way to get it ?

That is why you implement an MQ monitoring solution rather than put monitoring code in each application.

Related

ServiceStack.Server: Redis server integrated withing ServiceStack lib?

I want to clarify if I understood the ServiceStack.Server functionality correctly.
On this page, ServiceStack.Server API is described, and it states that
Creates a Redis MQ Server that processes each message on its own background thread
Am I correct when I then assumed that this is a standalone Redis server, so if I start this with the code below, I am running a fully fledged Redis server, meaning, no need to install the Redis software, or Memurai or the likes?
Because, if I follow this example, and have no other running Redis server, I get
'No connection could be made because the target machine actively refused it. 127.0.0.1:6379'
This line
var redisFactory = new PooledRedisClientManager("localhost:6379");
starts a client and tries to connect to 6379 and naturally fails. The redisFactory is then used in the line creating the MqServer, which is odd to me:
var mqHost = new RedisMqServer(redisFactory, retryCount: 2);
If this is a standalone MQ server, then creating a client before creating and starting the server isn't going to work, which makes me think this is not an Redis MQ server?
Am I correct when I then assumed that this is a standalone Redis server
That's an incorrect conclusion, the Redis Server is a distributed in-memory data structure server which just like other distributed servers like an RDBMS or MQ Broker runs in its own isolated networked process.
All ServiceStack Redis Libraries connect to a Redis Server, Redis MQ is like all other distributed ServiceStack MQ providers which process messages sent to a broker, in this case Redis MQ uses the Redis Server as its broker. The statement:
Creates a Redis MQ Server that processes each message on its own background thread
Explains how Redis MQ processes the messages that it receives, where each different Message Type (i.e. Request DTO Type) processes messages in its own background thread.

WCF IBM Websphere MQ Communication (WCF Listener)

I have a wcf service that executes some code and sends a message to the IBM WebSphere MQ hosted on a linux server. I can put and get messages from the queue just fine. What I wanted to know that is there a way by which whenever a message is sent to the queue a listener service (WCF) activates to process those messages? (this can be done by using netmsmqbinding and WAS for MSMQ)
I have researched a lot but was unable to find any code examples which made me think that is this even possible....
I have looked at some answers but they don't link wcf and mq part. A similar question is WCF / WebService to act as Listener for MQ Message? but there is no concrete answer. I have also looked at Listening to new enqueued messages using WCF Service.
So this scenario lead me to think that my only option is to write a windows service that after some interval listens (polls i.e invokes the get method on) the queue or write a console application that does that same thing.
Does anyone have a more elegant solution?
Triggering might be an option. WebSphere MQ can start an application when a message arrives on a queue:
http://www-01.ibm.com/support/docview.wss?uid=swg27020075&aid=1
As you want to trigger an application not running on the server of the queue manager, you will need a trigger monitor like this:
http://www-01.ibm.com/support/docview.wss?uid=swg24000149

WPF app : Inter-Process Communication for a multiple instance application

I've developped a WPF composite application which is installed through MSI in c:\Program Files\WPFAPP1 on a Windows Server 2008.
Due to the targeted system environment constraint, several local windows account users launched the main .exe file (and thus start each one an instance of this WPF app) from a remote machine with a .RDP link.
Each Windows user is a known WPF application user (user access rights).
I would like to develop a .NET component to share data between users and provide a messenger-like feature : can I achieve this by using WCF service with named pipes please?
Thanks for your reply,
It is possible, but far from an ideal solution. I have used named pipes for inter-process communication, but only for time signalling where the 2 processes had to be synchronized. It was not very reliable and had its weaknesses.
Named pipes communication requires additional threads to be running all the time listening for messages and the other processes would have to know exactly which name key to use to communicate with a particular process.
Basically, you would be far better off creating a client/server architecture using WCF and have the clients send messages up to the server to be distributed to the other clients. You could use a duplex channel like NetTcp or WsHttp to push messages from server to client, or have clients poll the server for new messages.

StackExchange Redis .NET client not getting messages when connections are reordered

Using the StackExchange.Redis client in a C# application, I am attempting to use PubSub to perform cross-server communication between web servers running the same application. In this model, each server is running its own Redis server, and its connection multiplexer sets the local server as the first server in the list. In other words, SERVER_A and SERVER_B each run a Redis server on port 6379 and have connection strings as follows:
SERVER_A --> "SERVER_A:6379,SERVER_B:6379"
SERVER_B --> "SERVER_B:6379,SERVER_A:6379"
Using external clients to subscribe to each Redis server, I can see SERVER_A publishing messages to its local Redis server. However, SERVER_B is not picking up the message, despite having a connection via the multiplexer. When I rearrange the order of the connections so they match, then messages from A are picked up by B. Is there something in a setting or otherwise that I need to do so that the connection multiplexer will listen to subscriptions on all servers, or is this a bug in the StackExchange.Redis client?
You don't mention any replication in your description. When SE.Redis connects to multiple servers it is intended to be a related family of servers - for example, either:
two or more 2.* servers related via master/slave
three or more 3.* servers related via a formal cluster
Replication groups have distribution mechanisms for pub/sub. Two disconnected servers: do not.

MSMQ: How can I create a private queue on a remote computer

I need to create a Private message queue on a Remote computer. All me research indicates this is not possible through the System.Messaging objects. Can anyone confirm/deny this. My other option is to create an addition service on the remote host that listens for requests to create queues and then creates them locally.
Any better/simpler ideas would be welcome.
You can't and you shouldn't.
MSMQ works like a mailbox, you only have to create an inbox, the outbox is created by MSMQ itself.
Indeed just create a sperate service that creates the queue on the remote machine, by installing it localy.
You can't and its annoying. MSMQ is strange in the windows environment. there are allot of differences about what you can do locally and remotely. There is nothing reasonable to do about it. Just live with it.

Categories

Resources