Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Polling importer not taking the latest updated time interval

Avatar

Level 4

Hi all,

I created a poll config with 300 seconds as the interval. It is working fine and polling for every five minutes. But if I updated the interval as, say 180 seconds, it's still taking up the old time and polling it for every five minutes. Shouldn't this be dynamic? I even restarted the server but it's still taking the old time interval. I don't want to restart or redeploy. Is there any reason why it isn't dynamic?

My poll config.

{

"jcr:primaryType": "sling:Folder",

"jcr:mixinTypes": [

"cq:PollConfig"

],

"jcr:createdBy": "admin",

"source": "myimporter:myDataSource",

"target": "somepath",

"jcr:created": "Fri Aug 11 2017 15:41:26 GMT+0530",

"interval": 180

}

1 Accepted Solution

Avatar

Correct answer by
Level 10

My findings -- it works on 6.1/6.2.

30.08.2017 10:26:53.538 *INFO* [pool-6-thread-3] com.community.aem.SimpleDSComponent Date : Wed Aug 30 10:26:53 EDT 2017

30.08.2017 10:26:53.538 *INFO* [pool-6-thread-3] com.community.aem.SimpleDSComponent scheme : myimporter

30.08.2017 10:26:53.538 *INFO* [pool-6-thread-3] com.community.aem.SimpleDSComponent datasource : myDataSource

You can change the value too in these versions:

AChangeVal.png

You are correct - on AEM 6.3 - it throws exceptions. The bundle does into an Active state - but you cannot edit it.

This is a Product bug in AEM 6.3 - Please open a ticket and reference this AEM Community Thread.

View solution in original post

11 Replies

Avatar

Community Advisor

I dont think your configuration is getting applied initially also. IIRC the default time is 300 sec, which is whats being used in your case all the time. Can you check if you have followed steps mentioned in Adobe Experience Manager Help | Creating Custom Data Importer Services for Adobe Experience Manager ?

If you did and still having issues, would be great if you can share a sample package with issue being reproducible.

Avatar

Level 4

The polling config created as per the example doesn't work at all in AEM 6.3 with Archetype 11. We have tested that extensively. Using sling folder as per this example worked.

Creating a Custom Content Importer for AEM/CQ5 | Olson Digital

Avatar

Community Advisor

Thats strange. i dont see a reason why it would depend on maven archetype. Anyway can share the code(github maybe) if you are still facing the issue that you mentioned?

Avatar

Level 4

Hi Vivek,

I used this code only

https://github.com/heervisscher/htl-examples/blob/master/core/src/main/java/com/adobe/examples/htl/c...

The problem is I'm not able to add or edit anything here

localhost:4502/etc/importers/polling.html

Ideally we should be able to edit and add right?

I even overlayed as per the instructions here Creating a Custom Content Importer for AEM/CQ5 | Olson Digital

Have you tried adding or editing?

It's totally blocking us and seems like a bug in AEM 6.3

Avatar

Community Advisor

Ok... I tried it now.. I can see the importer running and when I change the interval from crx-de, it is reflected and polling happens:

Here is the Java file which is almost same as the one you linked above. :

--- Java class---

package eventhandler;

import org.apache.felix.scr.annotations.Component;

import org.apache.felix.scr.annotations.Property;

import org.apache.felix.scr.annotations.Service;

import org.apache.sling.api.resource.Resource;

import com.day.cq.polling.importer.ImportException;

import com.day.cq.polling.importer.Importer;

@Component(metatype = false, enabled = true, label = "Custom importer")

@Service
@Property(name = Importer.SCHEME_PROPERTY, value = "myimporter")

public class CustomPolling implements Importer, Runnable {

   @Override
   public void run() {

  System.out.println("In run-method");

  }

   @Override
   public void importData(String scheme, String dataSource, Resource target, String login, String password) throws ImportException {

  System.out.println("In importData1-method");

  }

   @Override
   public void importData(String scheme, String dataSource, Resource target) throws ImportException {

  System.out.println("In importData2-method");

  }

}

-------------

And polling config:

Screen Shot 2017-08-29 at 9.48.17 PM.pngScreen Shot 2017-08-29 at 9.48.01 PM.png

Does that help?

Avatar

Level 4

Thanks for the reply. I have come to know that minimum time interval is 300 sec. AEM doesn't allow below that. But the main issue is

in 6.3 we are not able to edit or add new configurations here

localhost:4502/etc/importers/polling.html

But it is possible in 6.2. This seems like a clear bug. Can you check it if you have 6.3 as well? smacdonald2008​, can you please help?

Avatar

Level 10

I will look into this. Stuff like should not be changed unless clearly stated in the Release Notes. Did you see mention of this?

Avatar

Level 4

Hi Scott,

Thanks for your reply. I have seen the release notes of 6.3 and there is no mention of polling feature. Can you please look into it?

Basically, I should be able to edit the timing interval here but its not possible in 6.3 but working very fine in 6.2.

poll.PNG

It is throwing this error when I click on 'Edit'poll_error.PNG

Avatar

Level 10

I will see if I get the same results on 6.3.

Avatar

Correct answer by
Level 10

My findings -- it works on 6.1/6.2.

30.08.2017 10:26:53.538 *INFO* [pool-6-thread-3] com.community.aem.SimpleDSComponent Date : Wed Aug 30 10:26:53 EDT 2017

30.08.2017 10:26:53.538 *INFO* [pool-6-thread-3] com.community.aem.SimpleDSComponent scheme : myimporter

30.08.2017 10:26:53.538 *INFO* [pool-6-thread-3] com.community.aem.SimpleDSComponent datasource : myDataSource

You can change the value too in these versions:

AChangeVal.png

You are correct - on AEM 6.3 - it throws exceptions. The bundle does into an Active state - but you cannot edit it.

This is a Product bug in AEM 6.3 - Please open a ticket and reference this AEM Community Thread.

Avatar

Level 1

We're seeing something very similar where one cannot Edit /etc/importers/polling.html in 6.2 SP1 CFP4