@Test void testCompleteExceptionally() { QueryProviderOutbound grpcMessage = testSubject.serializeCompleteExceptionally("subscriptionId", new RuntimeException("Error")); SubscriptionQueryResponse subscriptionQueryResponse = grpcMessage.getSubscriptionQueryResponse(); assertEquals("subscriptionId", subscriptionQueryResponse.getSubscriptionIdentifier()); QueryUpdateCompleteExceptionally completeExceptionally = subscriptionQueryResponse.getCompleteExceptionally(); assertEquals("Error", completeExceptionally.getErrorMessage().getMessage()); }
@Deprecated QueryProviderOutbound serializeCompleteExceptionally(String subscriptionId, Throwable cause) { QueryUpdateCompleteExceptionally exceptionallyCompletedQueryUpdate = QueryUpdateCompleteExceptionally.newBuilder() .setErrorMessage(ExceptionSerializer.serialize( configuration.getClientId(), cause )) .setErrorCode(ErrorCode.QUERY_EXECUTION_ERROR.errorCode()) .setClientId(configuration.getClientId()) .setComponentName(configuration.getComponentName()) .build(); return newBuilder().setSubscriptionQueryResponse( SubscriptionQueryResponse.newBuilder() .setSubscriptionIdentifier(subscriptionId) .setCompleteExceptionally(exceptionallyCompletedQueryUpdate) ).build(); }
SubscriptionMessageSerializer { @Deprecated QueryProviderOutbound serializeCompleteExceptionally(String subscriptionId, Throwable cause) { QueryUpdateCompleteExceptionally exceptionallyCompletedQueryUpdate = QueryUpdateCompleteExceptionally.newBuilder() .setErrorMessage(ExceptionSerializer.serialize( configuration.getClientId(), cause )) .setErrorCode(ErrorCode.QUERY_EXECUTION_ERROR.errorCode()) .setClientId(configuration.getClientId()) .setComponentName(configuration.getComponentName()) .build(); return newBuilder().setSubscriptionQueryResponse( SubscriptionQueryResponse.newBuilder() .setSubscriptionIdentifier(subscriptionId) .setCompleteExceptionally(exceptionallyCompletedQueryUpdate) ).build(); } }
SubscriptionMessageSerializer { @Deprecated QueryProviderOutbound serializeCompleteExceptionally(String subscriptionId, Throwable cause) { QueryUpdateCompleteExceptionally exceptionallyCompletedQueryUpdate = QueryUpdateCompleteExceptionally.newBuilder() .setErrorMessage(ExceptionSerializer.serialize( configuration.getClientId(), cause )) .setErrorCode(ErrorCode.QUERY_EXECUTION_ERROR.errorCode()) .setClientId(configuration.getClientId()) .setComponentName(configuration.getComponentName()) .build(); return newBuilder().setSubscriptionQueryResponse( SubscriptionQueryResponse.newBuilder() .setSubscriptionIdentifier(subscriptionId) .setCompleteExceptionally(exceptionallyCompletedQueryUpdate) ).build(); } SubscriptionMessageSerializer(Serializer messageSerializer,
                                         Serializer serializer,
                                         AxonServerConfiguration configuration); }
SubscriptionMessageSerializer { @Deprecated QueryProviderOutbound serializeCompleteExceptionally(String subscriptionId, Throwable cause) { QueryUpdateCompleteExceptionally exceptionallyCompletedQueryUpdate = QueryUpdateCompleteExceptionally.newBuilder() .setErrorMessage(ExceptionSerializer.serialize( configuration.getClientId(), cause )) .setErrorCode(ErrorCode.QUERY_EXECUTION_ERROR.errorCode()) .setClientId(configuration.getClientId()) .setComponentName(configuration.getComponentName()) .build(); return newBuilder().setSubscriptionQueryResponse( SubscriptionQueryResponse.newBuilder() .setSubscriptionIdentifier(subscriptionId) .setCompleteExceptionally(exceptionallyCompletedQueryUpdate) ).build(); } SubscriptionMessageSerializer(Serializer messageSerializer,
                                         Serializer serializer,
                                         AxonServerConfiguration configuration); QueryRequest serializeQuery(SubscriptionQueryMessage subscriptionQueryMessage); SerializedObject serializeUpdateType(SubscriptionQueryMessage<?, ?, ?> subscriptionQueryMessage); QueryUpdate serialize(SubscriptionQueryUpdateMessage<?> subscriptionQueryUpdateMessage); SubscriptionQueryMessage<Q, I, U> deserialize(SubscriptionQuery subscriptionQuery); QueryResponseMessage<I> deserialize(QueryResponse queryResponse); SubscriptionQueryUpdateMessage<U> deserialize(QueryUpdate queryUpdate); @Deprecated SubscriptionQuery serialize(SubscriptionQueryMessage<?, ?, ?> subscriptionQueryMessage); }
SubscriptionMessageSerializer { @Deprecated QueryProviderOutbound serializeCompleteExceptionally(String subscriptionId, Throwable cause) { QueryUpdateCompleteExceptionally exceptionallyCompletedQueryUpdate = QueryUpdateCompleteExceptionally.newBuilder() .setErrorMessage(ExceptionSerializer.serialize( configuration.getClientId(), cause )) .setErrorCode(ErrorCode.QUERY_EXECUTION_ERROR.errorCode()) .setClientId(configuration.getClientId()) .setComponentName(configuration.getComponentName()) .build(); return newBuilder().setSubscriptionQueryResponse( SubscriptionQueryResponse.newBuilder() .setSubscriptionIdentifier(subscriptionId) .setCompleteExceptionally(exceptionallyCompletedQueryUpdate) ).build(); } SubscriptionMessageSerializer(Serializer messageSerializer,
                                         Serializer serializer,
                                         AxonServerConfiguration configuration); QueryRequest serializeQuery(SubscriptionQueryMessage subscriptionQueryMessage); SerializedObject serializeUpdateType(SubscriptionQueryMessage<?, ?, ?> subscriptionQueryMessage); QueryUpdate serialize(SubscriptionQueryUpdateMessage<?> subscriptionQueryUpdateMessage); SubscriptionQueryMessage<Q, I, U> deserialize(SubscriptionQuery subscriptionQuery); QueryResponseMessage<I> deserialize(QueryResponse queryResponse); SubscriptionQueryUpdateMessage<U> deserialize(QueryUpdate queryUpdate); @Deprecated SubscriptionQuery serialize(SubscriptionQueryMessage<?, ?, ?> subscriptionQueryMessage);  }