Setting up multiple Hosts(Channel) with ChannelAdaptor

1,000 views
Skip to first unread message

SUNNYben

unread,
Feb 21, 2013, 8:05:16 AM2/21/13
to jpos-...@googlegroups.com
I am trying to set up a mini switch. I have the server acting as the switch and connected to the hosts via vpn and I want the server to keep the connection open to all the hosts.

I have developed the switch to connect to the host when there is a transaction for it and disconnect after completing the transaction, but I feel there might be a better way of doing this.

Please I need help on this, maybe a sample configuration with multiple channels.

Thank you,
Sunnyben

Alejandro Revilla

unread,
Feb 21, 2013, 8:36:08 AM2/21/13
to jpos-...@googlegroups.com
You need to use a Server->MUX->ChannelAdaptor

See install the 'clientsimulator' and 'serversimulator' from jPOS-EE (http://jpos.org/doc/jPOS-EE.pdf) you have good examples of servers, muxes and channel adaptors.

--
@apr



--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.
Please support jPOS, contact: sa...@jpos.org
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
 
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

SUNNYben

unread,
Feb 21, 2013, 3:23:53 PM2/21/13
to jpos-...@googlegroups.com
I have gone through the book, but it doesn't explain what I am looking for.

I have Server and MUX set up already, but I need my ChannelAdaptor to connect to more than one host/channel, maybe three or four of them. Is there a way this can be achieved?

Thank you.

Mark Salter

unread,
Feb 21, 2013, 3:36:36 PM2/21/13
to jpos-...@googlegroups.com
On 21/02/2013 20:23, SUNNYben wrote:
> I have Server and MUX set up already, but I need my ChannelAdaptor to
> connect to more than one host/channel, maybe three or four of them. Is
> there a way this can be achieved?
Without caring which host/channel does the send?

Although this seems unlikely to be your need, you could just have
multiple ChannelAdaptors - one for each target - each using the same
input/output queues?

--
Mark

chhil

unread,
Feb 21, 2013, 3:39:36 PM2/21/13
to jpos-...@googlegroups.com
What prevents you from having  multiple channel deployment files with their corresponding mux deploy files.?

For  n channels you can have n such config files.
<?xml version="1.0" ?>

<channel-adaptor name='Channel1'
    class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
 <channel class="your.channel.classl" logger="Q2" realm="channel-1"
       packager="org.jpos.iso.packager.GenericPackager">      
  <property name="packager-config" value="cfg/packager_file.xml" />
  <property name="host" value='@host1@' />
  <property name="port" value="@iport1@" />
  <property name="timeout" value="1000000" />
  <property name="keep-alive" value="true" /> 
 
</channel>
 <in>Channel1-send</in>
 <out>Channel1-receive</out>
</channel-adaptor>


<?xml version="1.0" ?>

<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="mux1">
 <in>Channel1-receive</in>
 <out>Channel1-send</out>
 <ready>Channel1.ready</ready> <!-- needs to be adptor name + .ready-->
 <unhandled>incomm-unhandled</unhandled>
</mux>



-chhil

SUNNYben

unread,
Feb 22, 2013, 7:36:44 PM2/22/13
to jpos-...@googlegroups.com
Multiple deployment files did the trick.

Thank you.

chhil

unread,
Feb 23, 2013, 7:18:06 AM2/23/13
to jpos-...@googlegroups.com
You are welcome. There is a MultiSessionChannelAdaptor you could also take a look at that.

-chhil

Prathmesh Mhatre

unread,
Jan 13, 2019, 3:14:41 PM1/13/19
to jPOS Users
Dear,

can i add Multiple channel-adaptor xml dynamically while Q2 is running?

Alejandro Revilla

unread,
Jan 13, 2019, 3:16:07 PM1/13/19
to jPOS Users
Sure

Prathmesh Mhatre

unread,
Jan 14, 2019, 5:41:11 AM1/14/19
to jPOS Users
if we have different server and i want use same q2 then? 


On Monday, January 14, 2019 at 1:46:07 AM UTC+5:30, Alejandro Revilla wrote:
Sure

Reply all
Reply to author
Forward
0 new messages