TkbmMWMultithreadMessageQueueProcessor

Home Forums kbmMW TkbmMWMultithreadMessageQueueProcessor

Viewing 1 reply thread
  • Author
    Posts
    • #56543
      Babis Michael
      Participant

      Hello,

      How can i use this ?

      Thank you

    • #56544
      kimbomadsen
      Keymaster

      Hi,

      You inherit from it and override its InternalProcessMessage(const ASender:TObject; const AMessage:IkbmMWCustomTransportStream; var AAction:TkbmMWMessageProcessingSuccessAction) procedure or put an event handler in the OnProcess event. The procedure or event is called for each message to process.

      You should set the AAction property to the status of your processing.

      mwpsaRollback: Message will be rolled back, and whatever rollback processing will happen. It means that the message will be retried later, unless rolled back too often where stale detection kicks in.

      mwpsaReject: Means you specifically reject the message. It will be placed on the reject queue if such is setup on the queue that is being processed.

      mwpsaDelete: Message is deleted.

      mwpsaCommit: You have done with the message what you want to do, successfully. After commit, the message is basically gone.

      mwpsaRetry: Will retry in a short moment. Better use rollback to ensure that stale detection can kick in.

      mwpsaSkip: Will skip the message. No rollback nor commit will happen. Rarely use.

      Then instantiate an instance of the processor, set its Queue property to point on a queue you want it to process, and call Start. When you no longer want it to process messages call Stop.

      /Kim/C4D

      • #56547
        Babis Michael
        Participant

        Thank you 🙂
        It would be nice to add a demo of processors if it’s possible!

Viewing 1 reply thread
  • You must be logged in to reply to this topic.