NETCF 2.0 MSMQ Transaction

  • Thread starter Thread starter Chris Scott
  • Start date Start date
C

Chris Scott

Hi,

In VS2005 Beta, the call:
MessageQueue.Send(msg, MessageQueueTransactionType.Single);

Is always returning a "The transaction usage is invalid" error when sending
to a remote queue via FORMATNAME:DIRECT. Is this a limitation, a known
issue, or is there another way to get a message into a remote transactional
queue that I am not aware of?

Thanks!
 
Did you set "Transactional" property on a queue to true?
You also should be aware transactions are not really supported by MSMQ CE.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
Hi,

I tried but the transactional property on the MessageQueue is a read-only
property. If you mean the actual queue on the PC, yes it is transactional.

I wasn't sure about the level of support but I did find some documentation
in a BLOG that said that it supported the "single" transaction type. The
queue is not on the device so maybe there's no support for a remote
transactional queue?

Thanks for responding!

"Ilya Tumanov [MS]" said:
Did you set "Transactional" property on a queue to true?
You also should be aware transactions are not really supported by MSMQ CE.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Chris Scott" <[email protected]>
Subject: NETCF 2.0 MSMQ Transaction
Date: Mon, 20 Dec 2004 13:54:53 -0500
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <u#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:67264
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi,

In VS2005 Beta, the call:
MessageQueue.Send(msg, MessageQueueTransactionType.Single);

Is always returning a "The transaction usage is invalid" error when sending
to a remote queue via FORMATNAME:DIRECT. Is this a limitation, a known
issue, or is there another way to get a message into a remote transactional
queue that I am not aware of?

Thanks!
 
I'm sure if MessageQueue.Transactional is false, attempt to use transaction
will fail.
Local queue can be created as transactional, but I see no way MSMQ can
figure out remote queue is transactional.
It can't ask as device might be disconnected. And I don't see how developer
can tell it to MSMQ with Messaging.
I would have to investigate that.

Meanwhile, I would suggest dropping transactions so you can continue.
Single message transaction is exactly the same as no transaction at all
(unless you're using message routing).

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Chris Scott" <[email protected]>
References: <u#[email protected]>
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Mon, 20 Dec 2004 15:23:10 -0500
Lines: 63
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ewze#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:67275
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi,

I tried but the transactional property on the MessageQueue is a read-only
property. If you mean the actual queue on the PC, yes it is transactional.

I wasn't sure about the level of support but I did find some documentation
in a BLOG that said that it supported the "single" transaction type. The
queue is not on the device so maybe there's no support for a remote
transactional queue?

Thanks for responding!

"Ilya Tumanov [MS]" said:
Did you set "Transactional" property on a queue to true?
You also should be aware transactions are not really supported by MSMQ CE.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Chris Scott" <[email protected]>
Subject: NETCF 2.0 MSMQ Transaction
Date: Mon, 20 Dec 2004 13:54:53 -0500
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <u#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
 
That's what I thought as well but what we want is a situation where we know
that the remote queue is transactional (even if the device does not) and be
able to put a message into that queue so we can read from it transactionally
on the other side (using a commit when the final processing of the message
is completed). Posting the message may be the same for a single transaction
but reading it from the queue would be different because it would give us
some built-in functionality. If it's still something that can change before
release then you have my vote for it. :)

The other option I'm testing is to post it to a remote (non-transactional)
queue and then perform a "read - do some process - consume" type operation
on it. We want to be certain that the processing has been successful before
we remove the message from the queue.


"Ilya Tumanov [MS]" said:
I'm sure if MessageQueue.Transactional is false, attempt to use transaction
will fail.
Local queue can be created as transactional, but I see no way MSMQ can
figure out remote queue is transactional.
It can't ask as device might be disconnected. And I don't see how developer
can tell it to MSMQ with Messaging.
I would have to investigate that.

Meanwhile, I would suggest dropping transactions so you can continue.
Single message transaction is exactly the same as no transaction at all
(unless you're using message routing).

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Mon, 20 Dec 2004 15:23:10 -0500
Lines: 63
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ewze#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:67275
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi,

I tried but the transactional property on the MessageQueue is a read-only
property. If you mean the actual queue on the PC, yes it is transactional.

I wasn't sure about the level of support but I did find some documentation
in a BLOG that said that it supported the "single" transaction type. The
queue is not on the device so maybe there's no support for a remote
transactional queue?

Thanks for responding!

"Ilya Tumanov [MS]" said:
Did you set "Transactional" property on a queue to true?
You also should be aware transactions are not really supported by MSMQ CE.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Chris Scott" <[email protected]>
Subject: NETCF 2.0 MSMQ Transaction
Date: Mon, 20 Dec 2004 13:54:53 -0500
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <u#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
 
A newbie (MSMQ at least) question:

If one wants to send messages (e.g. over a flaky GPRS, CMD2000, EV-DO)
wireless connection where the TCP connection breaks from time to time) does
one need the local MSMQ to be transactional? (the PPC will remain up, no
soft resets, just that the link will go down from time to time).

Is the no local transactions a limitation of CF 2.0 wrapper to MSMQ. Or is
it basic in the WinCE (i.e. current) MSMQ?
 
I don't believe it matters on receiving side if message has been sent in
single message transaction or not.
Once message delivery has been confirmed, it's deleted from outgoing queue
and it's already in remote queue.
Which functionality are you referring to?

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Chris Scott" <[email protected]>
References: <u#[email protected]>
<[email protected]>
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Tue, 21 Dec 2004 08:12:08 -0500
Lines: 135
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14
.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:67321
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

That's what I thought as well but what we want is a situation where we know
that the remote queue is transactional (even if the device does not) and be
able to put a message into that queue so we can read from it transactionally
on the other side (using a commit when the final processing of the message
is completed). Posting the message may be the same for a single transaction
but reading it from the queue would be different because it would give us
some built-in functionality. If it's still something that can change before
release then you have my vote for it. :)

The other option I'm testing is to post it to a remote (non-transactional)
queue and then perform a "read - do some process - consume" type operation
on it. We want to be certain that the processing has been successful before
we remove the message from the queue.


"Ilya Tumanov [MS]" said:
I'm sure if MessageQueue.Transactional is false, attempt to use transaction
will fail.
Local queue can be created as transactional, but I see no way MSMQ can
figure out remote queue is transactional.
It can't ask as device might be disconnected. And I don't see how developer
can tell it to MSMQ with Messaging.
I would have to investigate that.

Meanwhile, I would suggest dropping transactions so you can continue.
Single message transaction is exactly the same as no transaction at all
(unless you're using message routing).

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Mon, 20 Dec 2004 15:23:10 -0500
Lines: 63
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ewze#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
 
I thought that as well, but if I send the message to the remote
transactional queue using the .Send(msg) call it never shows up in the
remote queue. Using the same call to a non-transactional queue results in
the message appearing instantly.

"Ilya Tumanov [MS]" said:
I don't believe it matters on receiving side if message has been sent in
single message transaction or not.
Once message delivery has been confirmed, it's deleted from outgoing queue
and it's already in remote queue.
Which functionality are you referring to?

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.<[email protected]>
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Tue, 21 Dec 2004 08:12:08 -0500
Lines: 135
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14
phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:67321
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

That's what I thought as well but what we want is a situation where we know
that the remote queue is transactional (even if the device does not) and be
able to put a message into that queue so we can read from it transactionally
on the other side (using a commit when the final processing of the message
is completed). Posting the message may be the same for a single transaction
but reading it from the queue would be different because it would give us
some built-in functionality. If it's still something that can change before
release then you have my vote for it. :)

The other option I'm testing is to post it to a remote (non-transactional)
queue and then perform a "read - do some process - consume" type operation
on it. We want to be certain that the processing has been successful before
we remove the message from the queue.


"Ilya Tumanov [MS]" said:
I'm sure if MessageQueue.Transactional is false, attempt to use transaction
will fail.
Local queue can be created as transactional, but I see no way MSMQ can
figure out remote queue is transactional.
It can't ask as device might be disconnected. And I don't see how developer
can tell it to MSMQ with Messaging.
I would have to investigate that.

Meanwhile, I would suggest dropping transactions so you can continue.
Single message transaction is exactly the same as no transaction at all
(unless you're using message routing).

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Chris Scott" <[email protected]>
References: <u#[email protected]>
<[email protected]>
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Mon, 20 Dec 2004 15:23:10 -0500
Lines: 63
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ewze#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
 
Single message is guaranteed to be delivered intact or not delivered at all
in any case.

Single message "transaction" is supported by MSMQ CE. However, it's not
really a transaction.
Say, no information in this "transaction" is available to developer.
So, it's not possible to check if transaction completed/failed. You also
can't commit/roll it back.

The difference between no transaction and SMT is:
1. If you're not using routing: none.
2. If you're using routing:
No transaction: message will be considered delivered and deleted from
outgoing queue as soon as it's delivered to router.
SMT: message will be considered delivered and deleted from outgoing
queue as soon as it's delivered to final destination.

Real transactions are not supported by native MSMQ CE; it's not a
limitation of Messaging on CF.

I don't believe there is any difference on receiving transactional queue
side regardless if SMT was used on a source or not.
I might be wrong on it, though.

By the way, undelivered messages can survive device's reset if sent in
recoverable mode.
Unstable connection is also not a big deal; MSMQ will deliver messages in
background as soon as it can (it has network sensing).
The most significant problem in MSMQ deployment over would be address
resolution so server can send messages to mobile devices with dynamic IP.
Security is also very important consideration. Recommended solution is VPN.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Yechezkal Gutfreund" <[email protected]>
References: <u#[email protected]>
<[email protected]>
<ewze#[email protected]>
 
OK, I think I found the answer:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceappservi
ces5/html/wce50lrfmqopenqueue.asp

Quote:

To open a remote transactional queue, append XACTONLY to the end of the
format name. For example,
FORMAT=remotemachine\private$\transactionalqueue;XACTONLY is marked as
transactional for all subsequent open operations.
The XACTONLY flag is required because Active Directory lookup is not
supported in Windows CE, so there is no way to check if the remote queue is
transactional. However, the flag is always ignored when opening local
queues.

Please let me know if that solves the problem.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Chris Scott" <[email protected]>
References: <u#[email protected]>
<[email protected]>
<ewze#[email protected]>
<[email protected]>
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Tue, 21 Dec 2004 13:38:55 -0500
Lines: 203
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:67356
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

I thought that as well, but if I send the message to the remote
transactional queue using the .Send(msg) call it never shows up in the
remote queue. Using the same call to a non-transactional queue results in
the message appearing instantly.

"Ilya Tumanov [MS]" said:
I don't believe it matters on receiving side if message has been sent in
single message transaction or not.
Once message delivery has been confirmed, it's deleted from outgoing queue
and it's already in remote queue.
Which functionality are you referring to?

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.<[email protected]>
Subject: Re: NETCF 2.0 MSMQ Transaction
Date: Tue, 21 Dec 2004 08:12:08 -0500
Lines: 135
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 12.20.122.76
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08 limitation,
 
I finally had an opportunity to try this and it works great as long as I
send the message into the queue with the MessageQueueTransactionType.Single
set on the Send() call.

Thanks for the help in getting this to work! You should have the
documentation team add this notation to the MessageQueue class documentation
and also the Message.Send() documentation.
 
Back
Top