on 08-16-2016 1:48 PM
Hi.
I've been developing a custom adapter following Eng Swee Yeoh's great blog on this topic.
The adapter runs, but is not handling multiple nodes on the PO server very well.
Picking up files in Test mode are done simultaneously on each node and processed, creating duplet messages.
I’ve not been able to figure out how this could be handled by the provided framework.
An easy way to solve it, could be running the custom adapter on one cluster node only.
The standard SAP file (sender) adapter does this too, that is, running the adapter on one cluster node at a time for each poll interval!
Anyone know how to do this?
Other suggestions for duplet handling in the custom adapter are welcome
Best regards…
Peter
Hi Peter,
The adapter runs, but is not handling multiple nodes on the PO server very well.
Picking up files in Test mode are done simultaneously on each node and processed, creating duplet messages.
I'm curious as to how you made the file adapter use all four nodes. As far as I know, you can only use one node for the file sender because of locking issues. Are you sure this is not because of the test mode? Test mode polls the same file over and over, it is also the reason you are getting duplicate messages. Set the processing to delete and your issue will disappear. Just upload a new file if you want to test again.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter, all,
Polling adapters (like File or JDBC) make use of Adapter Framework Scheduler, that manages polling jobs. The adapter registers a polling task on the Adapter Framework Scheduler for every started polling adapter. Adapter Framework Scheduler in its turn is responsible for scheduling corresponding job on the specific cluster node and ensuring the polling job is only scheduled on a single node in a cluster (which avoids unwanted situation of multiple nodes executing same polling job / same polling attempt for a communication channel at the same time).
I could not find publicly available technical documentation that contains code snippets of the process of registration of the polling adapter tasks against Adapter Framework Scheduler (which is done using classes in the package com.sap.aii.af.lib.scheduler), so looking into logic of any standard polling adapter and replicating it is likely to be a way to go. For example, you may have a look into classes com.sap.aii.adapter.file.File2XI (for File adapter) or com.sap.aii.adapter.jdbcJDBC2XI (for JDBC adapter) to get better clue about this.
Regards,
Vadim
Dear Peter
Sorry that I was not able to respond to this earlier as I was away.
I'm glad that Vadim provided you with the much needed pointers to help you on your way. I did not do any testing on a multiple node environment, so to be honest, I'm also not sure of the behaviour and I would have suggested pretty much the same thing, which is to look into how SAP's adapter works.
I hope you did manage to figure things out in the end and got it working. If you did, may I suggest that you blog about it (when you do find some time on your hands) - there are plenty of gaps to fill for content in the adapter development in SCN, and it would definitely benefit a lot of members in the community both now and in the future.
Regards
Eng Swee
Hi Eng Swee.
Thanks again for your great work regarding the custom adapter building...
Brilliant inspiration
Regarding the Scheduling and Locking, I did manage to solve the problem.
Unfortunately not using the existing framework.
I ended up building my own simple locking class.
Looking into the standard code revealed the way SAP works, but it is not portable to the sample adapter easily (for me at least), so after some time finding the classes, and trying to use them, without luck, I had to throw the towel into the ring. I ran out of time!
I haven't given up yet though... Will give it a look, when I have a little time left again
Best regards...
Peter
Hello Peter,
not sure it is available in custom developed adapter, but have a look at SAP Note #2029410 and check these parameters in your custom one.
Best regards,
Vadym
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
did you tried the clustersync mode parameter?
1259515 - 'clusterSyncMode' is available as service property
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.