MSMQ seems to be polling at 1 second intervals

BgestelBgestel Member Posts: 136
Hi,

I'm using

'Navision Communication Component version 2'.CommunicationComponent
and
'Navision MS-Message Queue Bus Adapter'.MSMQBusAdapter

To make nav reply to messages i send using a .net app.

To test i'm pushing 100 threads on the threadpool which each send 1 message and wait for a reply.
The logging for this is below.
You can see that my development system replies in +- 200 ms where the customer server gets progresivly slower.

It looks like the CommunicationComponent at the customer is polling at a 1 second interval causing the messages to pile up.

I would like to know some more about the internal mechanisms of the CommunicationComponent and why it is slow on the customer system and fast at my side.

When i use a test app to reply to the messages , in stead of nav , all goes fast => msmq performance is good
When i log the time it takes for nav to process the message , from the received trigger to after it gets send , all goes fast => NAV performance is good
It looks like the time gets lost in the CommunicationComponent

On the Customer System
2008 R2 On Hyper V
Sql 2008 R2 + nav 5.1 upd2 + testapp + msmq on same box

Starting 100 threads.
Started 100 threads.
ID ElapsedMs testsRunning
0 479 1
1 1981 3
2 3032 6
3 4030 9
4 5053 10
5 6105 11
6 7613 12
7 8642 13
8 9674 14
9 10720 15
10 12228 16
11 13265 17
12 13785 18
13 15287 19
14 15827 20
15 16811 21
16 17411 22
17 18364 23
18 18985 24
19 19902 26
20 20542 27
21 21429 28
22 22120 29
23 22959 30
24 23670 31
25 24494 32
26 25244 33
27 26038 34
28 26792 35
29 27567 36
30 28363 37
31 29106 38
32 29903 39
33 30628 40
34 31454 41
35 32151 42
36 33005 44
37 33685 45
38 34566 46
39 35189 47
40 36127 48
41 36713 49
42 37669 50
43 38231 51
44 39236 52
45 39783 53
46 41307 53
47 41815 52
48 42824 51
49 43405 50
50 44372 49
51 44949 48
52 45871 47
53 46494 46
54 47414 45
55 48074 44
56 48946 43
57 49636 42
58 50497 41
59 51211 40
60 51998 39
61 52737 38
62 53523 37
63 54310 36
64 55065 35
65 55881 34
66 56587 33
67 57436 32
68 58104 31
69 58977 30
70 59605 29
71 60513 28
72 61178 27
73 62116 26
74 62685 25
75 63661 24
76 64211 23
77 65173 22
78 65721 21
79 66731 20
80 67275 19
81 68788 18
82 69314 17
83 70306 16
84 70873 15
85 71819 14
86 72401 13
87 73336 12
88 73960 11
89 74875 10
90 75512 9
91 76413 8
92 77103 7
93 77972 6
94 78666 5
95 79487 4
96 80235 3
97 81036 2
98 81780 1
99 82530 0

On my development System
nav 5.1 upd2 + testapp + msmq on same box
SQL2008R2 on different box

Starting 100 threads.
Started 100 threads.
ID ElapsedMs testsRunning
1 1652 3
0 1742 3
2 788 3
3 320 3
4 256 3
5 242 3
6 264 4
7 257 4
8 254 4
9 230 4
10 208 4
11 215 4
12 237 4
13 215 4
14 223 4
15 209 4
16 207 4
17 178 4
18 198 5
19 168 5
20 166 5
21 223 5
22 267 5
23 259 5
24 292 5
25 297 5
26 304 5
27 253 5
28 225 5
29 281 5
30 275 6
31 312 6
32 302 6
33 318 6
34 314 6
35 267 6
36 303 6
37 307 6
38 262 6
39 265 6
40 243 6
41 376 6
42 383 6
43 380 6
44 376 6
45 391 6
46 423 6
47 426 6
48 296 6
49 317 6
50 318 6
51 327 6
52 371 6
53 389 6
54 390 6
55 372 6
56 337 6
57 335 6
58 323 6
59 261 6
60 206 6
61 198 6
62 193 6
63 205 6
64 209 6
65 205 6
66 203 6
67 325 6
68 325 6
69 327 6
70 309 6
71 299 6
72 296 6
73 294 6
74 167 6
75 168 6
76 172 6
77 188 6
78 223 6
79 236 6
80 322 6
81 356 6
82 377 6
83 381 6
84 386 6
85 358 6
86 362 6
87 285 6
88 263 6
89 257 6
90 281 6
91 293 6
92 292 6
93 287 6
94 296 5
95 296 4
96 287 3
97 257 2
98 245 1
99 238 0
**********************
** SI ** Bert Van Gestel **
**********************

Comments

  • KYDutchieKYDutchie Member Posts: 345
    Hi Bert,

    This looks to me as a programming issue. I worked with MSMQ and the ComCom for a commerce portal application before and that was real time.

    It seems to me that you have a codeunit that is executed on a timer?
    To make this real time and let NAV react properly to received messages did you set the "with Events" property on your ComCom variable? This will create the event triggers for you and one of those is a "MessageReceived" event trigger. If you put your code in that trigger NAV should react to the received messages.

    Let me know if this helps,

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • DenSterDenSter Member Posts: 8,305
    The MQ Bus adapter is event driven, so it should pick up the message as it is sent into the queue. It doesn't have an internal timer. Looks like your first test is just slower than the second.
  • BgestelBgestel Member Posts: 136
    KYDutchie => the code is reacting to the trigger(withEvents), both test runs are using the same software , no timers involved annywhere.

    Denster => you can test this , if you place msq1 and msq2 on lets say box1 , and you run NAV and a testing app on lets say box 2 , the same thing will happen, this could then be explained by a network link between the two machines and The MQ Bus adapter. But the same setup on 1 Box will run with reasonble performance.

    So it still is a great mistery to why it get's slow, memory and cpu are both plenty, maybe the hyper v is to blaim , who knows.

    I logged it with ms support as well, maybe they can shed some light on the issue.
    **********************
    ** SI ** Bert Van Gestel **
    **********************
Sign In or Register to comment.