Hi Frank,

On Wed, Jun 5, 2013 at 11:53 PM, Frank Arico <[email protected]> wrote:

> I am using  the Vysper 0.7 core jar  and have added a custom endpoint , and
> some custom filters to my Vysper main. I am doing my business logic in the
> filters. The business logic entails just sending the payload on to Kafka.
>

With filters, you mean MINA IoFilters?


>  I've coded up a client in the SMACK API which sends a continuous stream of
>  stanzas  to my Vysper  instance. When I kill the client,  the Vysper
> server terminates sometimes with an XML parse error  other times without a
> stack trace.  How do I gracefully handle clients unexpectantly terminated
> on the server side ?
>

MINA Filters have a method
  org.apache.mina.core.filterchain.IoFilter#exceptionCaught
for all other exceptions, I guess you'd need to wrap your filter code with
try-catch.


>  Where would I look to add exception handlers  in my vysper code?
>  I assume Vypser core can handle droppedconnections and client failure
>  Should I be doing  business logic in filters or is there a better way to
> do it ?
>

When a client connection is lost, all server-side resources are freed.
This is done in
   org.apache.vysper.mina.XmppIoHandlerAdapter#sessionClosed

Does that help?

  Bernd

Reply via email to