4
votes

This is the first time I'm using BizTalk for cross-machine, asynchronous, reliable communication.
I would like to know is there a way to directly send messages from one machine to BizTalk queue or I have to use local MSMQ which in turn sends messages to BizTalk?

In C#, is there a binding that is used in order to send messages to BizTalk queues?
For MSMQ I know that there is NetMsmqBinding.

Cheers

Update:

Since I've introduced a bit of confusion, I'll try to explain a bit and please correct me if I'm wrong.
As far as I know, ESBs implement the concept of queues or message channels that can be used for reliable, asynchronous communication (messaging in short). Now, I'm having difficulty placing BizTalk into this concept. There are dozens of interpretation of ESB concept and same number of opinions on if BizTalk is an ESB, like Sonic or TIBCO...
Now, as far as I know, for example in TIBCO which implements JMS API, there are no queues or queueing services on local client machine (e.g. MSMQ), but they are present and configured on TIBCO ESB and from client app I use JMS API to send messages to these queues.
So when I want to communicate via BizTalk with apps on different machines and I want to use messaging, I'll be using MSMQ on local machine and MSMQ will transfer these messages to BizTalk and other apps downstream?
Also, where should I configure the communication between local MSMQ and BizTalk? Should I configure BizTalk to listen to a given MSMQ for new messages or there is some configuration that should take place on MSMQ itself, as well?

3
What do you mean by 'directly communicate'?Tom W
Send message from c# app to a queue on BizTalkdragan.stepanovic
Can you be more specific about what you mean by 'queue'? I'm only a novice at BizTalk myself, but as far as I know there is no specific concept of a queue in the BizTalk model. I'm going to answer with the assumption that there is some confusion of ideas that I will address there, and will happily edit later if more detail comes out.Tom W

3 Answers

5
votes

BizTalk communicates with the outside world through artefacts called adapters, which can provide an endpoint visible to the outside world over a wide range of messaging protocols.

There is an MSMQ adapter, which seems to be able to read from and publish to queues on either the local computer or a remote computer. I've never used it, so I'm coming from a position of reading the docs on this adapter and finding out as I go along. I've found the BizTalk documentation to be particularly difficult to navigate, particularly as a lot of the microsoft links now go nowhere in particular - it took a little while to find these pages I've mentioned. Do let me know if you find anything kicking around that's not obvious as I'm sure there are useful resources I've never been able to find.

To configure BizTalk to listen to a queue:

  • Create a One-Way Receive Port
  • Create a One-Way Receive Location associated with that port
  • Set the receive location's transport Type to 'MSMQ'
  • Click 'configure'
  • Specify the credentials to use and the queue name (which includes the machine name, implying that it works equally well on remote queues)
  • Set the other properties appropriately to your scenario

That should be all there is to it. Publishing to that queue should then cause a message to be received on that port, which immediately persists it to the message box database. You'll have to do some processing using pipelines and/or maps in order to do anything useful with the message.

However, you are by no means limited to MSMQ. A pretty comprehensive list is available, and BizTalk doesn't constrain you to any particular messaging protocol. You can also implement custom adapters with whatever behaviour you need. In order to answer your question more usefully, it'd be helpful to know what your real requirements are - what's the use case for the client application, for example?

1
votes

BizTalk operates off of the concept of Ports - both receive and send. These Ports leverage many different technologies to read and write messages, but none are direct communication with other BizTalk Servers. You'll need to leverage something like MSMQ or even basic Web Services - that's up to you - but you'll need some sort of communication protocol in between.

0
votes

"Also, where should I configure the communication between local MSMQ and BizTalk? Should I configure BizTalk to listen to a given MSMQ for new messages or there is some configuration that should take place on MSMQ itself, as well?"

Answer: You need to configure BizTalk to poll the respective queue at a defined interval(Can be configured in BizTalk). In MSMQ you need to grant access rights to the User account which will use when it polls the queue.