Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Not being able to confirm subscription: java.lang.IllegalArgumentException: Invoked method public abstract void org.springframework.cloud.aws.messaging.endpoint.NotificationStatus.confirmSubscription() is no accessor method! #5

Open
jchavesarias opened this issue Mar 22, 2016 · 0 comments

Comments

@jchavesarias
Copy link

The auto configuration should have fixed that right?

I don't have any xml files, just following this aws-refapp as it is.

This is the end point controller:

@RestController
@RequestMapping("/sns/messages")
public class SnsEndpointResource {

private static Logger LOG = LoggerFactory.getLogger(SnsEndpointResource.class);

private final SendingTextWebSocketHandler snsSendingTextWebSocketHandler;

@Autowired
public SnsEndpointResource(@Qualifier("snsWebSocketHandler") SendingTextWebSocketHandler snsSendingTextWebSocketHandler) {
    this.snsSendingTextWebSocketHandler = snsSendingTextWebSocketHandler;
}

@NotificationSubscriptionMapping
public void confirmSubscription(NotificationStatus notificationStatus) {
    LOG.info("Received SNS subscription {}", notificationStatus);
    notificationStatus.confirmSubscription();
}

@NotificationMessageMapping
public void receiveNotification(@NotificationMessage String message, @NotificationSubject String subject) {
    LOG.info("Received SNS message {} with subject {}", message, subject);

    try {
        this.snsSendingTextWebSocketHandler.broadcastToSessions(new DataWithTimestamp<>(new SnsNotificationDTO(subject, message)));
    } catch (IOException e) {
        LOG.error("Was not able to push the message to the client.", e);
    }
}

}

@jchavesarias jchavesarias changed the title Not being to confirm subscription: java.lang.IllegalArgumentException: Invoked method public abstract void org.springframework.cloud.aws.messaging.endpoint.NotificationStatus.confirmSubscription() is no accessor method! Not being able to confirm subscription: java.lang.IllegalArgumentException: Invoked method public abstract void org.springframework.cloud.aws.messaging.endpoint.NotificationStatus.confirmSubscription() is no accessor method! Mar 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant