7 Replies Latest reply on Aug 23, 2006 8:04 PM by 511304

    Adapter Message Based Partitioning

    528066
      Hi,

      I'm trying to investigate the use of partitioning without much success. I have set up two publishing AQ adapters with a partition created on both, routing event1 via first partition (on adapter1) and routing event2 via the second partition (on adapter2). There is no in order delivery required across events and both events are subscribed to by the same application.

      However when i publish event1 and event2 they are not being picked up by the appropriate adapter, adapter1 picks up some event2 messages and adapter2 picks up some event1 messages. The adapters then error as the message does not comply with the event based routing set up. (AQ Adapter: ** Error ** there was no OAI message corresponding to the message dequeued from the AQ. Please check your Event Map rules in iStudio.... ).

      I've had a look at the 10g documentation (we're using OAI 10.1.2) but its not very useful.

      Does anyone have any experience of partitioning or is my problem simply that i can not have more than 1 AQ adapter dequeueing from a queue?

      Thanks

      Carol
        • 1. Re: Adapter Message Based Partitioning
          511304
          If you think that the order of delivery is not important, then you could create multiple instances of the adapter to achieve load balancing.

          However, WRT to the issue with partitions, make sure, you have updated the partition names in the adapter.ini of both the adapters on the publishing end. As the application names in the adapter.ini will still be the same, if you didn't mention the partition names in the adapter.ini, then there is a possibility that both adapters are picking up messages and thus the error. I am however not sure the parameters where you need to specify the partition names.

          HTH
          • 2. Re: Adapter Message Based Partitioning
            528066
            Thanks for your reply,

            As far as i'm aware having multiple adapter instances means that the adapters need to be installed within different oracle homes and we wanted to steer clear of that.

            My problem was related to incorrect configuration within iStudio, once this was corrected the publishing worked fine. The following parameters were set within the adapter.ini files

            partition=P1
            agent_subscriber_name=<adapter1>P1
            agent_message_selector=recipient_list like '%,<adapter1>P1,%'

            Application name remained unchanged (application=<adapter1>)

            I'm now looking at pure load balancing partitioning and while the publishing adapters are working correctly the subscribe adapters are not.

            I've set up a PL/SQL subscribe adapter with one partition, however when i send a message across both the original adapter and the partition adapter are picking up the message resulting in the message being processed twice into the database. The adapter.ini files are configured exactly the same as the publishing adapters so have no idea why they're not working.

            thanks

            Carol
            • 3. Re: Adapter Message Based Partitioning
              511304
              Hi,

              You can install multiple instances of the same adapter in the same Oracle Home using the copyAdapter script. But here,
              1. You would not be able to maintain the order of messages being processed.
              2. Any one of the adapter instances will pick the message whichever is free.

              For the Partition issue? Please check if you have created the partitions in iStudio for the Subscribed events also?

              HTH,
              Harish
              • 4. Re: Adapter Message Based Partitioning
                528066
                Hi,

                I've removed the persistence directories associated with the adapters, checked the iStudio config and restarted the adapters (agent_delete_file_cache_at_startup=true) but this has not resolved the problem.

                Checked iStudio and config looks correct, one subscribe adapter (<adapter>) with two partitions set up (4 & 5). The same event has been selected for each partition and when i start the adapters (<adapter>, <adapter>4 and <adapter>5) they all state they are subscribing to this event. However when i publish this event it is duplicated across <adapter>4 and <adapter>5, resulting in the same messages reaching the target database twice. The original adapter <adapter> does not have any instances of this event routed to it.

                May try installing multiple instances of the same adapter, however would like to resolve this issue first.

                thanks

                Carol
                • 5. Re: Adapter Message Based Partitioning
                  511304
                  If the Same event is selected for both the partitions, then both the adapters will process that event. So Just select the event in one partition in which you want the message to be processed.

                  Say if you have selected the event in both the partitions P1 and P2, then when you start the adapters, both the adapters will subscribe to the event as you have specified the event in that partition.

                  So just remove the event from one partition and it should work fine.

                  -Harish
                  • 6. Re: Adapter Message Based Partitioning
                    528066
                    thanks for your response

                    selecting the event for just one partition does resolve the problem.

                    however what i don't understand is that when the exactly the same config (one event associated with > 1 partition) is applied to the AQ publish adapters we do not have the same problem, the message is processed once only.

                    Did set up multiple instances of the same subscribe adapter and that works, so will probably go with that config.

                    thanks

                    Carol
                    • 7. Re: Adapter Message Based Partitioning
                      511304
                      The message would be processed by the AQ Adapter only once because when the message would be enqueued/dequeued only once, So which ever partition first gets that message processes that message. But again, you wouldn't know which of the partition would process that message.

                      HTH