Problem with Microsoft Message Queue

sanjeevasawale
Member Posts: 63
](*,) Hi Friends,
As per example from Application Designer I have created 2 code units for sending and receiving messages in Navision.
For that I hv installed "Communication Componant/Bus Adapter"."Navision SDK".
As per App. Disgn. instruction m running Message Receiving codeunit 1st and from second session on the same client while running Send message codeunit am getting bellow error -
Is this problem because of Port code : 8079. If yes then which port no. need to give here and how to get port no of any client.
Please help my friends.
Sanjeev
As per example from Application Designer I have created 2 code units for sending and receiving messages in Navision.
For that I hv installed "Communication Componant/Bus Adapter"."Navision SDK".
As per App. Disgn. instruction m running Message Receiving codeunit 1st and from second session on the same client while running Send message codeunit am getting bellow error -
Am also posting here sending code unit's codesThe call to member GetStream failed. SocketBusAdapter.SocketBusAdapter.1 returned the following message: Failed to connect to 127.0.0.1 on port 8079
IF ISCLEAR(CC2) THEN CREATE(CC2); IF ISCLEAR(SBA) THEN CREATE(SBA); CC2.AddBusAdapter(SBA,0); OutMsg := CC2.CreateoutMessage('Sockets://localhost:8079'); OutS := OutMsg.GetStream(); OutS.WRITE('My Message');
Is this problem because of Port code : 8079. If yes then which port no. need to give here and how to get port no of any client.
Please help my friends.
Sanjeev
0
Comments
-
The Socket busadapter is for TCP/IP Socket communication, not for MSMQ communication. For that you use the MQBusAdapter. Search for a file called 'devguide.chm' on your product CD and you will find lots of useful code examples how to use the communication component and the adapters. Note that they are limited though, so you will not have full MSMQ functionality using the comcom.0
-
Thx 4 Reply
,
I tried with its options also. So can u tell me what I need to install on my laptop and need to set parameters. As of now I have installed Communication Component and Bus Adapter. What more apart from this?
Do I need to install Application Server for that..?
Also if u hv code sample which run successfully please give me here.
Thx
Sanjeev0 -
DenSter wrote:The Socket busadapter is for TCP/IP Socket communication, not for MSMQ communication. For that you use the MQBusAdapter. Search for a file called 'devguide.chm' on your product CD and you will find lots of useful code examples how to use the communication component and the adapters. Note that they are limited though, so you will not have full MSMQ functionality using the comcom.
find the file, it has code examples.
0 -
Read the help file on Tools CD. Search for NAS or Application Server here at the downloads. You can also take a look at Navision Integration Framework in the downloads - it's still beta, but maybe it's useful as an example.
You don't really need Application Server I think. You can just leave a client running on the server. However it's useful, because it throws the error messages into the event log instead of on the screen.0 -
Hey Frndz,
Believ me I already gone thru the help provided by Navision and tested its sample codes but i think something is missing due to which m getting the problem.
I used socket with different port nos. I dont _stand which port to put and how to get port no.
I tried Queue message but that also giving problem.
Thats why m asking detail help coz that navision help doesnt cover the system requirement.
Pls help.
Regds,
Sanjeev0 -
I don't know what to say... I used the devguide samples and I got it to work by simply doing exactly what the code samples say, literally by copying and pasting the code from the help file into NAV objects. If you can't specify exactly where things go wrong, I won't know what the problem is and I won't be able to help.0
-
Denster,
Sorry 4 later reply. After defining changing SingleInstance Property of Receiving Codeunit problem solved. But when it receives message it receives lots of junk and empty messages along with sent message.
One more thing I also installed Messaging Queue Component.
Is it possible to receive particular message sent to me.
I am using XP.0 -
Why don't you check out the Navision Integration Framework in the downloads as an example? Message receiving works perfectly in it (only the reply seems to get lost for some reason).0
-
Check this:
- only the common MSMQ components are installed. The AD Integration part of MSMQ screws up the bus adapter for some reason. I've seen messages disappear and I got them when I uninstalled all MSMQ components except for the common ones.
- Dedicate one message queue for your program. If other programs send messages into this message queue, you're going to receive those too and it will get confused. With the bus adapter you can't peek the queue, so you have to dedicate certain queues for your program
- Set the receiving message queue to be a NON transactional queue. This is another limitation of the bus adapter, it does not know how to deal with a transactinal queue.
- The message that is sent into your queue has to be a single byte character stream. In double byte encoding characters are represented by two pairs of numbers, and the second pair of single byte characters have the same value as EOS in single byte encoding, and this causes the bus adapter to think that it's the end of the stream, when in fact it's just the end of the first character.
Could you please tell us what 'lots of junk' means?0 -
Thx Buddies,
Junk message means blank message box some time box character appears and then my message appear along with box character @ its end.
Still Struggling with that problem. ](*,)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions