Forum Stats

  • 3,814,934 Users
  • 2,258,933 Discussions
  • 7,892,890 Comments

Discussions

getting valid mSGIDs

3004
3004 Member Posts: 204,171 Green Ribbon
Hi,
I am using oo4o in VC++ and doing a #import of COM server rather than going the OStartup way.
Can I enqueue msgs into the exception queue associated with normal queues? The doc. says apps can't do it directly. is there an indirect way? I need this so that dequeued msg which failed during their processing can be pushed in execption queue. Related to this error processing is my next question.

My second question is regarding the msgid that a Enqueue/Dequeue method returns. In my BSTR variable i see junk characters rather then the actual msgid of the row in the queue table. Am i doing something wrong?
I even used VB,OCI but all times i see junk characters being returned by calls to Dequeue

code:
#import ...

OraAQPtr m_pAQ
OraMsgPtr m_pAQmsg

...do init..
BSTR msgid
msgid = m_pAQ->Enqueue();
...
msgid = m_pAQ->Dequeue();

//Msgid in both places are junk characters.

Much appreciate any help is these issues.

Thanks
Viresh

Comments

  • 3004
    3004 Member Posts: 204,171 Green Ribbon
    Hi Viresh,

    You can't directly enqueue into an exception queue. System moves a message to the exception queue when the message can't be successfully delivered. This can happen in following scenarios:
    * Message is expired.
    * Attempts to dequeue the message exceeds retry count.
    * Enqueue at destination fails during propagation.

    To answer your second question, the message id for the message is system-defined. After enqueuing the message, use the messageId you got to dequeue the messsage. You should be successful in dequeuing the message.

    cheers,
    Brajesh.
This discussion has been closed.