@Override
    public <T> T fromPubSubMessage(final PubsubMessage message, final Class<T> payloadType) {
        return FunctionUtils.doUnchecked(() -> {
            val payload = new String(cipherExecutor.decode(message.getData().toByteArray()), StandardCharsets.UTF_8);
            return MAPPER.readValue(payload, payloadType);
        });

    }
This is {@link GoogleCloudPubSubMessageConverter}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-gcp-pubsub-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/GoogleCloudPubSubMessageConverter.java