You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Manuel Hegner <ma...@bakdata.com> on 2019/04/23 10:21:37 UTC

Logging Problem in ProtocolCodecFilter

Heyo,

we have a problem in using the ProtocolCodecFilter class. If anything in
messageReceived goes wrong mina creates a ProtocolDecoderException. If our
tool is not able to ascertain a readable error message we simply log the
exception stacktrace and all. In minas case this means that mina tries to
write the whole hex dump to the log, which can take forever if the message
is very large.

For now we circumvent this by using a changed version of
ProtocolCodecFilterthat only adds the first n bytes to the exception, but
this is kind of messy.

Is there a better way to deal with that?

Kindest regards,
Manuel Hegner
------------------------------
<http://bakdata.com> *Manuel Hegner*
Data Engineer
📞 +49 30 3406 068 – 47 <+4930340606847>
📧 manuel.hegner@bakdata.com bakdata GmbH
Falckensteinstraße 24
D-10997 Berlin
Geschäftsführer: Alexander Albrecht, Christoph Böhm, Frank Kaufer
Sitz Berlin, Amtsgericht Berlin HRB 174303

Re: Logging Problem in ProtocolCodecFilter

Posted by Jonathan Valliere <jo...@apache.org>.
Oh I’ll fix that in the morning.

On Wed, Apr 24, 2019 at 3:22 PM Emmanuel Lecharny <el...@apache.org>
wrote:

> Hi Manuel,
>
> There is a bug in the function that dumps data as hex (
> https://issues.apache.org/jira/plugins/servlet/mobile#issue/DIRMINA-1104)
>
> This should be fixed in a coming version.
>
> Le mar. 23 avr. 2019 à 12:21, Manuel Hegner <ma...@bakdata.com> a
> écrit :
>
> > Heyo,
> >
> > we have a problem in using the ProtocolCodecFilter class. If anything in
> > messageReceived goes wrong mina creates a ProtocolDecoderException. If
> our
> > tool is not able to ascertain a readable error message we simply log the
> > exception stacktrace and all. In minas case this means that mina tries to
> > write the whole hex dump to the log, which can take forever if the
> message
> > is very large.
> >
> > For now we circumvent this by using a changed version of
> > ProtocolCodecFilterthat only adds the first n bytes to the exception, but
> > this is kind of messy.
> >
> > Is there a better way to deal with that?
> >
> > Kindest regards,
> > Manuel Hegner
> > ------------------------------
> > <http://bakdata.com> *Manuel Hegner*
> > Data Engineer
> > 📞 +49 30 3406 068 – 47 <+4930340606847>
> > 📧 manuel.hegner@bakdata.com bakdata GmbH
> > Falckensteinstraße 24
> > D-10997 Berlin
> > Geschäftsführer: Alexander Albrecht, Christoph Böhm, Frank Kaufer
> > Sitz Berlin, Amtsgericht Berlin HRB 174303
> >
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>

Re: Logging Problem in ProtocolCodecFilter

Posted by Emmanuel Lecharny <el...@apache.org>.
Hi Manuel,

There is a bug in the function that dumps data as hex (
https://issues.apache.org/jira/plugins/servlet/mobile#issue/DIRMINA-1104)

This should be fixed in a coming version.

Le mar. 23 avr. 2019 à 12:21, Manuel Hegner <ma...@bakdata.com> a
écrit :

> Heyo,
>
> we have a problem in using the ProtocolCodecFilter class. If anything in
> messageReceived goes wrong mina creates a ProtocolDecoderException. If our
> tool is not able to ascertain a readable error message we simply log the
> exception stacktrace and all. In minas case this means that mina tries to
> write the whole hex dump to the log, which can take forever if the message
> is very large.
>
> For now we circumvent this by using a changed version of
> ProtocolCodecFilterthat only adds the first n bytes to the exception, but
> this is kind of messy.
>
> Is there a better way to deal with that?
>
> Kindest regards,
> Manuel Hegner
> ------------------------------
> <http://bakdata.com> *Manuel Hegner*
> Data Engineer
> 📞 +49 30 3406 068 – 47 <+4930340606847>
> 📧 manuel.hegner@bakdata.com bakdata GmbH
> Falckensteinstraße 24
> D-10997 Berlin
> Geschäftsführer: Alexander Albrecht, Christoph Böhm, Frank Kaufer
> Sitz Berlin, Amtsgericht Berlin HRB 174303
>
-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com