Curiously, this fix is exactly what I was looking for too...
So, I've switch my pom to
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-mina</artifactId>
<version>1.3-SNAPSHOT</version>
</dependency>
but, for some reason camel-mina declares a dependency on mina-java5 which is
bringing in v1.0.2 instead of v.1.0.8.
How can I fix this?
Also, I'd really prefer to use mina-core v.1.1.5. Is there a way to get this
to work with camel-mina or do I need to supply my own camel-mina pom
replacement?
thanks in advance,
Steven Marcus
James.Strachan wrote:
>
> On 14/11/2007, James Chamberlain <[EMAIL PROTECTED]> wrote:
>> The test case is working for me from home. The caveat is that at home I
>> run on Linux and use jdk 1.6.x and before I was running tests at work on
>> OSX with 1.5.0_13.
>
> FWIW I'm using OS X on 1.5 too
>
>
>> The problem is that my real cases still don't seem to
>> work properly. If I took your test case below and removed the portion
>> that feeds the udp traffic from the file and tried to feed it myself
>> from another process that is not working for me. Below is some example
>> UDP code that I was using to drive it:
>>
>> DatagramSocket socket = new DatagramSocket();
>> byte buffer[] = new byte[1500];
>> buffer = "TEST_STRING".getBytes();
>> InetAddress address = InetAddress.getByName("127.0.0.1");
>> DatagramPacket packet = new DatagramPacket(buffer,
>> buffer.length, address, 9123);
>> while(true) {
>> socket.send(packet);
>> Thread.sleep(2000);
>> }
>>
>> Camel never seems to recognize those udp messages. Shouldn't this work
>> or am I using it in an improper way?
>
> Great catch! This had me stuck a little while!
>
> It turned out mostly to be that the default codec's (textline and
> serialization) don't work that well on UDP/multicast. So I've modified
> the MinaComponent to by default use a simple ByteBuffer based codec -
> so that the ByteBuffer is currently visible to the consumer in Camel.
>
> I've created a test case pretty much as you describe which now seems
> to be working fine. I raised this JIRA to track the issues...
> https://issues.apache.org/activemq/browse/CAMEL-225
>
> I've just commit a fix for this, so hopefully using trunk you'll be
> able to use it fine to consume UDP messages.
>
> I've also added a more flexible way of configuring the codec if you
> wish to supply your own implementation via the registry etc...
> http://cwiki.apache.org/CAMEL/mina.html
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source SOA
> http://open.iona.com
>
>
--
View this message in context:
http://www.nabble.com/Problem-using-the-mina-component-tf4760195s22882.html#a13889793
Sent from the Camel - Users mailing list archive at Nabble.com.