Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram-source seems to not emit proper cloud-events #513

Closed
rhuss opened this issue Sep 16, 2021 · 1 comment · Fixed by #524
Closed

telegram-source seems to not emit proper cloud-events #513

rhuss opened this issue Sep 16, 2021 · 1 comment · Fixed by #524

Comments

@rhuss
Copy link
Contributor

rhuss commented Sep 16, 2021

When using the telegram-source and connect it properly to telegram and a Knative event sink, when I send a text message via Telegram, I receive an error that indicates that an invalid cloud-event sink is sent to the sink:

Failed delivery for (MessageId: 0DC421EDD62EC02-0000000000000001 on ExchangeId: 0DC421EDD62EC02-0000000000000001). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelException: HTTP operation failed invoking http://broker-ingress.knative-eventing.svc.cluster.local/default/default with statusCode: 400, statusMessage: Bad Request

Message History (complete message history is disabled)
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
[source            ] [source            ] [from[telegram://bots?authorizationToken=xxxxxx]                               ] [         8]
	...
[route1            ] [to1               ] [knative:event?apiVersion=eventing.knative.dev%2Fv1&kind=Broker                ] [         0]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
: org.apache.camel.CamelException: HTTP operation failed invoking http://broker-ingress.knative-eventing.svc.cluster.local/default/default with statusCode: 400, statusMessage: Bad Request
	at org.apache.camel.component.knative.http.KnativeHttpProducer.lambda$process$0(KnativeHttpProducer.java:135)
	at io.vertx.ext.web.client.impl.HttpContext.handleDispatchResponse(HttpContext.java:371)
	at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:358)
	at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:336)
	at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:303)
	at io.vertx.ext.web.client.impl.HttpContext.dispatchResponse(HttpContext.java:265)
	at io.vertx.ext.web.client.impl.HttpContext.lambda$null$8(HttpContext.java:520)
	at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:96)
	at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:59)
	at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:37)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)

and in the broker's log (that I used as sink):

{
  "level": "warn",
  "ts": "2021-09-15T09:17:11.321Z",
  "logger": "mt_broker_ingress",
  "caller": "ingress/ingress_handler.go:137",
  "msg": "failed to extract event from request",
  "commit": "0c41e6d",
  "error": "bad key, CloudEvents attribute names MUST consist of lower-case letters ('a' to 'z') or digits ('0' to '9') from the ASCII character set"
}

I'm using Camel-K 1.6.0 on Minikube

@heiko-braun
Copy link

@nicolaferraro FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants