title: Oracle database change notification not working when inserts qty exceeds 20
body: <pre><code>public class Register {
  
      @Autowired
      private DataSource dataSource;
  
      @Autowired
      private DCNListener listener;
  
  
      private OracleConnection oracleConnection = null;
      private DatabaseChangeRegistration dcr = null;
      private Statement statement = null;
      private ResultSet rs = null;
  
  
      @PostConstruct
      public void init() {
          this.register();
      }
  
  
      private void register() {
  
  
          Properties props = new Properties();
          props.put(OracleConnection.DCN_NOTIFY_ROWIDS, "true");
          props.setProperty(OracleConnection.DCN_IGNORE_DELETEOP, "true");
          props.setProperty(OracleConnection.DCN_IGNORE_UPDATEOP, "true");
  
          try {
  
              oracleConnection = (OracleConnection) dataSource.getConnection();
  
              dcr = oracleConnection.registerDatabaseChangeNotification(props);
              statement = oracleConnection.createStatement();
              ((OracleStatement) statement).setDatabaseChangeRegistration(dcr);
  
              rs = statement.executeQuery(listenerQuery);
  
              while (rs.next()) {
  
              }
  
              dcr.addListener(listener);
  
              String[] tableNames = dcr.getTables();
              Arrays.stream(tableNames)
                      .forEach(i -&gt; log.debug("Table {}" + " registered.", i));
  
          } catch (SQLException e) {
              e.printStackTrace();
              close();
          }
  
      }
  }
  </code></pre>
  
  <p>My Listener:</p>
  
  <pre><code>public class DCNListener implements DatabaseChangeListener {
  
      @Override
      public void onDatabaseChangeNotification(DatabaseChangeEvent databaseChangeEvent) {
  
          TableChangeDescription[] tableChanges = databaseChangeEvent.getTableChangeDescription();
  
          for (TableChangeDescription tableChange : tableChanges) {
  
              RowChangeDescription[] rcds = tableChange.getRowChangeDescription();
  
              for (RowChangeDescription rcd : rcds) {
  
                  RowOperation op = rcd.getRowOperation();
                  String rowId = rcd.getRowid().stringValue();
  
                  switch (op) {
  
                      case INSERT:
                          //process
                          break;
  
                      case UPDATE:
                          //do nothing
                          break;
  
                      case DELETE:
                         //do nothing
                          break;
  
                      default:
                          //do nothing
                  }
  
              }
  
          }
      }
  }
  </code></pre>
  
  <p>In my Spring boot application, I have an Oracle DCN Register class that listens for INSERTS in an event table of my database. I am listening for insertion new records.</p>
  
  <p>In this Event table, I have different types of events that my application supports, lets say EventA and EventB. </p>
  
  <p>The application gui allows you to upload in bulk these type of events which translate into INSERT into the oracle database table I am listening to.</p>
  
  <p>For one of the event types, my application is not capturing the INSERT <em>ONLY</em> when it is 20 or more events uploaded in bulk, but for the other event type, I do not experience this problem. </p>
  
  <p>So lets say user inserts <code>eventA</code> any number &lt; 20, my application captures the inserts. But if the number of <code>eventA</code> inserts exceeds 20, it does not capture.</p>
  
  <p>This is not the case for <code>eventB</code> which works smoothly. I'd like to understand if I'm missing anything in term of registration and anything I can look out for maybe in the database or what the issue could be here? </p>