1z0-900 practice questions, page 6 of 6, with answer review and explanations.
Question 26
You need to exchange large binary messages using chunks in a WebSocket application. Identify two ways in which you can receive partial messages. (Choose two.)
Define an @OnMessage method with a single MimePart parameter.
Use a ChunkListener interface implementation.
Use a MessageHandler.Partial<ByteBuffer> interface implementation.
Define an @OnMessage method with byte [] as the first parameter and a boolean as the second parameter.
Question 27
Given: Which client-side Java method will send the employee object to the WebSocket Server Endpoint?
session.post(employee);
container.send(employee);
session.send(employee);
remote.sendObject(employee);
Question 28
You are working with JMS publish-subscribe operations. What happens when a producer publishes a message to a topic for which a durable subscription exists but there are no subscribers available?
The publisher waits for a subscriber, who then consumes it. However, the publisher will time out if no consumer arrives within the given timeout period.
The publisher sends the message. However, it is never consumed because there wasn't anything listening when it arrived, regardless of the message timeout length.
The publisher successfully sends a message, which will be consumed later, once there is a subscriber, assuming the message hasn't timed out.
The message publisher is immediately notified about the lack of subscribers and can decide for itself if, and when, to resend.