question

Upvote
Accepted
16 2 2 3

Using the RFAJ 8.0 API - is there anything specific that needs to be done to kill a connection to RSSLConnection outside of the Application Cleanup steps such as unregisterClient, destroyConsumer/Queue, cleanup?

I have a memory leak in my application due to the RSSLConnection connection retaining references to by objects even after I have destroyed the eventqueue and the consumer and released the session via the API. Due to the connection retaining references to my Client class (which implements com.reuters.rfa.common.Client). How can I kill the connection so the referenced objects can be cleaned up?

treprfarfa-apirsslconsumermemory
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
281 1 3 7

RFA Java 8.0.1.E1 (latest) fixes objects-retention issue found when using batch snapshot requests.

---------------------------------------
rfaj8.0.1.E1.all
---------------------------------------
RFA-304; RFA Java holds references to objects in consumer batch application space.
This has been fixed.
(CaseId: 04554581)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1.2k 23 31 44

RFA/Java 8.0.0.L2 (latest 8.0.1) fixes a memory leak bug whereby connections will retain references to closures when returned to the pool.

---------------------------------------
rfaj8.0.0.L2.all
---------------------------------------
rfaj3799; RFA Java holds on to references to Closure objects and thus
prevents them from being garbage collected.
This has been fixed.
(CaseId: 03836653) (RFAJAVA-435)

Also a common missed step is that after deactivating an event queue one must drain the queue of events, this is not required in RFA/C++. Example:

private void drainqueue() {
	LOG.trace ("Draining event queue.");
	int count = 0;
	try {
		while (this.event_queue.dispatch (Dispatchable.NO_WAIT) > 0) { ++count; }
		LOG.trace ("Queue contained {} events.", count);
	} catch (DeactivatedException e) {
/* ignore on empty queue */
		if (count > 0) LOG.catching (e);
	} catch (Exception e) {
		LOG.catching (e);
	}
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.