component for base domain

9 posts / 0 new
Last post
component for base domain


I would like to set up an instance of Tigase that has only s2s enabled (no c2s/bosh), and then I want my component to be able accept packets of the virtual hosts themselves without conflicting with s2s. So for example, if I have virtual hosts ",,", then I want to add a component that can receive stanzas for exactly these names (well, and any localpart@ and /resource), as opposed to subdomains via the name of my component. Then, if a stanza comes in to="", s2s would receive it, and then pass it to my component.

How would I configure this?

Also, is it okay to use AbstractMessageReceiver for such a component, or is there a different class I should use for processing stanzas on the base domain?



oops, forgot to login. well it is me. :)

The simplest way is to use config type to preconfigure your installation: --gen-config-cs seems to be the best choice. You can also disable/enable components which are not needed:


Also you need to list all virtual hosts for which you want the s2s to accept packets --virt-hosts.

You can use AbstractMessageReceiver for your own component and I think this is the best choice. If you want all the packets to be passed to the component you are basically write something like session manager. Please have a look at the SessionManager implementation as an example.


Thanks, I'll look at SessionManager.

By the way, this message repeats in the logs every few seconds:

2012-03-20 22:58:36 ConnectionManager$ FINE: Reconnecting service for component: ext-comp, to remote host: ext-comp.localhost on port: 5,555
2012-03-20 22:58:36 ConnectionManager$ConnectionListenerImpl.accept() FINEST: Accept called for service: null@null
2012-03-20 22:58:36 IOService.accept() INFO: Problem connecting to remote host: ext-comp.localhost, address: null, socket: Socket[unconnected] - exception: Connection refused, session data: {port-no=5555, socket=plain, remote-host=ext-comp.localhost, routing-table=[Ljava.lang.String;@38714d56, local-host=localhost, secret=someSecret, ifc=[Ljava.lang.String;@23e79334, type=connect, required=false, max-reconnects=1799996}
2012-03-20 22:58:36 ConnectionManager$ConnectionListenerImpl.accept() FINEST: Problem reconnecting the service: null, type: connect, Socket: null, cid: null@null
2012-03-20 22:58:36 ConnectionManager.reconnectService() FINER: Reconnecting service for: ext-comp, scheduling next try in 2secs, cid: null@null

Maybe it is a side effect of using get-config-cs? Should I disable more components?

get-config-cs creates a Tigase instance with all network connection managers: s2s, c2s, external component (ext-comp). If some of them are not required you can disable them configuration presented above.
To disable the external component connection manager, you have to put in your config something like this:


This has been working well until I noticed today that disco packets are being hijacked. Maybe there could be a config parameter to disable this, so that these stanzas get through and routed like others?

For now I think I can solve this by commenting out just a few lines in

Are there any other stanza types handled internally this way?

To be honest, I do not really understand what you mean by packets being hijacked. And what exactly would you like to disable?

This is true, that service disco are handled in a special way in the Tigase. I am going to work in next version to somehow improve it.


I just mean that if a disco packet comes in from a remote domain, then Tigase itself replies to it, rather than passing it on to my component. It could be that this is only a problem if the packet targets the base domain.

In any case, I commented out the "if (packet.isServiceDisco()" block and my component receives all stanzas.

There are ways in Tigase to process service disco by every component. If you track down the code you plan to comment out, you should be able to see what methods are called from each component for the service disco packet.