Never mind. "pipeline" is the answer to my question.
from("timer://kickoff?period=10000").
setBody(constant("declare @h uniqueidentifier; declare @str
nvarchar(4000); receive top(1) @h=conversation_handle,
@str=message_body from Aspcust1LogQueue; if @h is not null begin; end
conversation @h; select @str as body; end")).
pipeline("jdbc:msServiceBroker").
to("activemq:vadim33");
On Tue, Jul 8, 2008 at 12:45 PM, Vadim Chekan <[EMAIL PROTECTED]> wrote:
> Ok, I managed to receive MS Service Borker messages from sql server. Like
> this:
> from("timer://kickoff?period=10000").
> setBody(constant("declare @h uniqueidentifier; declare
> @str
> nvarchar(4000); receive top(1) @h=conversation_handle,
> @str=message_body from Aspcust1LogQueue; if @h is not null begin; end
> conversation @h; select @str as body; end")).
> to("jdbc:msServiceBroker");
>
> So what I do from now?
> Ideally i'd like to have it like this:
> from("jdbc:msBroker?sql=......").to("activemq:log");
> from(activemq:log).to("xmpp:myuser:[EMAIL PROTECTED]/room");
>
>
> But apparently jdbc component offers only producers endpoint. As Claus
> advised I used "timer" trick (see above).
> I thought that I can create 2 routes:
> route 1: timer->jdbc
> route 2: jdbc->activemq
> but I got the same problem: in the second route jdbc can not create a
> consumers endpoint.
> So the question is: how to consume a message from jdbc component if it
> does not offer consumers endpoint?
>
> I looked at
> components\camel-jdbc\src\test\java\org\apache\camel\component\jdbc\jdbcroutetest.java
> and it contains code that sends a message "manually" to a queue with
> jdbc route and the the code extracts "out" message from exchange. I'm
> scratching my head how to hook it up to the camel (not junit)
> scenario.
>
> Vadim.
>
--
>From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT
is explicitly specified