41174118411941204121412241234124412541264127
message.putIntProperty("propTest", i % 2 == 0 ? 1 : 2); producer.send(message); if (i % 1000 == 0) { session.commit(); } } session.commit();
41214122412341244125412641274128412941304131
{ session.commit(); } } session.commit(); session.start(); for (int msg = 1; msg <= 2; msg++) {
41404141414241434144414541464147414841494150
// assertEquals(msg, message.getIntProperty("propTest").intValue()); System.out.println("i = " + i + " msg = " + message.getIntProperty("propTest")); } session.commit(); assertNull(consumer.receiveImmediate()); consumer.close(); }
42384239424042414242424342444245424642474248
producer.send(message); if ((i + 1) % 2 == 0) { session.commit(); } } session.commit();
42424243424442454246424742484249425042514252
{ session.commit(); } } session.commit(); session.start(); ClientConsumer cons = session.createConsumer(ADDRESS);
43874388438943904391439243934394439543964397
cons.close(); cons = session.createConsumer(ADDRESS); session.commit(); assertNull(cons.receiveImmediate()); long timeout = System.currentTimeMillis() + 5000;
44064407440844094410441144124413441444154416
Thread.sleep(50); } assertFalse(pgStoreAddress.isPaging()); session.commit(); } finally { session.close(); sf.close();
44974498449945004501450245034504450545064507
producer.send(message); if ((i + 1) % 2 == 0) { session.commit(); if (i < 400) { pgStoreAddress.forceAnotherPage(); } }
45054506450745084509451045114512451345144515
pgStoreAddress.forceAnotherPage(); } } } session.commit(); sf.close(); locator.close();
28522853285428552856285728582859286028612862
System.out.println("i = 55"); } ClientMessage msg = consumer.receive(5000); Assert.assertNotNull(msg); msg.acknowledge(); session.commit(); } session.close(); } finally