You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Wai Keung Yiu Man Lung <wa...@gmail.com> on 2020/08/12 09:25:59 UTC

Camel Rest Endpoint DSL prefix the string "null" to query parameters key

Hi,

I am using version 3.4.2.

While working with the endpoint DSL for the REST producer component, I
noticed that I could not properly set the queryParameters.

Every time I use the DSL, it will add a string prefix of "null" in front of
the key.

It seems the autogenerated factory produces something wrong as per the
reference in github

https://github.com/apache/camel/blob/camel-3.4.2/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestEndpointBuilderFactory.java#L486


I do not know how to use the queryParameters in the URI format either, my
current work around is to simply add it as a regular query parameter to the
camel URI in the "to" route.

For.e.g,
"rest:get:{baseUrl}?queryParam1={queryParam1}&queryParam2={queryParam2}" ...

It will be great to have some feedback on how to use the endpoint dsl / how
to use the rest component correctly in sending HTTP query params with
queryParameters in string URI format.

Cheers,
Wai Keung

sjms batch dead letter queue question

Posted by Bing Lu <mf...@yahoo.com.INVALID>.
 Hi, i am using sjms batch and during volume testing, there are bunch of messages going to the dead letter queue with the following, any ideas why? thanks

Unknown message type [org.apache.activemq.command.ActiveMQMessage] ActiveMQMessage {commandId = 16, responseRequired = true, messageId = ID:178a8eb48e18-37191-1597337746358-1:3:1:1:12, originalDestination = null, originalTransactionId = null, producerId = ID:178a8eb48e18-37191-1597337746358-1:3:1:1, destination = queue://test.dlq, transactionId = null, expiration = 0, timestamp = 1597339950588, arrival = 0, brokerInTime = 1597339950591, brokerOutTime = 1597340874786, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@1cfa1722, dataStructure = null, redeliveryCounter = 0, size = 1064, properties = {cacheId=8GM00276074CPD1597339918}, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirst

 


Re: Camel Rest Endpoint DSL prefix the string "null" to query parameters key

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for reporting this, its a little bug
https://issues.apache.org/jira/browse/CAMEL-15400

On Wed, Aug 12, 2020 at 11:26 AM Wai Keung Yiu Man Lung
<wa...@gmail.com> wrote:
>
> Hi,
>
> I am using version 3.4.2.
>
> While working with the endpoint DSL for the REST producer component, I
> noticed that I could not properly set the queryParameters.
>
> Every time I use the DSL, it will add a string prefix of "null" in front of
> the key.
>
> It seems the autogenerated factory produces something wrong as per the
> reference in github
>
> https://github.com/apache/camel/blob/camel-3.4.2/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestEndpointBuilderFactory.java#L486
>
>
> I do not know how to use the queryParameters in the URI format either, my
> current work around is to simply add it as a regular query parameter to the
> camel URI in the "to" route.
>
> For.e.g,
> "rest:get:{baseUrl}?queryParam1={queryParam1}&queryParam2={queryParam2}" ...
>
> It will be great to have some feedback on how to use the endpoint dsl / how
> to use the rest component correctly in sending HTTP query params with
> queryParameters in string URI format.
>
> Cheers,
> Wai Keung



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2