How to use external component?

Trinh Tran
Added over 3 years ago

Hi Tigase,

I am trying to use external component instead of internal component.

I tried to run 2 instances of tigase server in 2 PCs:

PC1 as main server: with config:

--external = mycomponent.mydomain.local:api-secret:listen:5720:mydomain.local:accept:ReceiverBareJidLB

PC2 as external component (just update the configuration and run from main server code):

--comp-class-1 = tigase.mytest.TestComponent
--comp-name-1 = mycomponent
--external = mycomponent.mydomain.local:api-secret:connect:5720:mydomain.local:accept

But when i send message from my external component i cannot received any messages.

It is OK if i use this component as INTERNAL component.

My question are:

  1. To run a external component we also need to run with main server code? the external just one class or one lib, but to run it as external we need all code, libs as main server and start as main server?

  2. If we start 2 instances: 1 for main server, 1 for external component then how we can test on same PC? then how we deploy these to same server?

  3. Pls give some advice why i cannot receive any message from external component as above configuration (but internal is OK)


Replies (1)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

I assume you've read External Component Configuration

Please note, that you should include in your configuration:


Which will also allow running both instances on same machine (there won't be port conflict because with above config component instance won't use all default components)