anchor.diff:  	    .getHeaders().get(GcpPubSubHeaders.ORIGINAL_MESSAGE);
   
   	originalMessage.nack();
  -
  -    // retrow to let the adapter know something went wrong.
  -    // this will prevent the message from being automatically acknowledged.
  -    throw message.getPayload();
   }
   ----
   
  
positive.code: }
  ----
  
  If you would prefer to manually ack or nack the message, you can do it by retrieving the header of exception payload:
  
  [source,java]
  ----
  
negative.code: }
  ----
  
  ====== Error Handling
  
  If you want to have more control over message processing in case of an error, you need to associate the `PubSubInboundChannelAdapter` with a Spring Integration error channel and specify the behavior to be invoked with `@ServiceActivator`.
  
  