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

Message acknowledged even in case exception thrown #102

Open
amarkevich opened this issue Aug 27, 2021 · 0 comments
Open

Message acknowledged even in case exception thrown #102

amarkevich opened this issue Aug 27, 2021 · 0 comments
Labels
bug Something isn't working P3

Comments

@amarkevich
Copy link

Function

public class FunctionCommand implements BackgroundFunction<Message> {
  @Override
  public void accept(Message message, Context context) throws Exception {
    throw new Exception();
  }
}

Expected: message NACK
Actual: Function execution took 2431 ms, finished with status: 'ok'

Failed execution produce only stacktrace:

...
com.wedextim.function.command.FunctionCommand.accept(FunctionCommand.java:18)
com.google.cloud.functions.invoker.BackgroundFunctionExecutor$TypedFunctionExecutor.serviceLegacyEvent(BackgroundFunctionExecutor.java:285)
com.google.cloud.functions.invoker.BackgroundFunctionExecutor.lambda$serviceLegacyEvent$8(BackgroundFunctionExecutor.java:375)
com.google.cloud.functions.invoker.BackgroundFunctionExecutor.runWithContextClassLoader(BackgroundFunctionExecutor.java:382)
com.google.cloud.functions.invoker.BackgroundFunctionExecutor.serviceLegacyEvent(BackgroundFunctionExecutor.java:375)
com.google.cloud.functions.invoker.BackgroundFunctionExecutor.service(BackgroundFunctionExecutor.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:547)
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297)
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212)
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
com.google.cloud.functions.invoker.runner.Invoker$NotFoundHandler.handle(Invoker.java:392)
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
org.eclipse.jetty.server.Server.handle(Server.java:500)
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135)
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
java.base/java.lang.Thread.run(Thread.java:829)

@amarkevich amarkevich changed the title Message acknowledged eve in case exception thrown Message acknowledged even in case exception thrown Aug 27, 2021
@josephlewis42 josephlewis42 added the bug Something isn't working label Apr 6, 2023
@HKWinterhalter HKWinterhalter added P3 and removed P2 labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3
Projects
None yet
Development

No branches or pull requests

3 participants